InternVL / app.py
zyliu's picture
Update app.py
96fcdcf verified
raw
history blame
1.54 kB
import os
import streamlit as st
import streamlit.components.v1 as components
st.set_page_config(layout="wide")
backend_url = os.getenv("backend", "https://internvl.opengvlab.com/") # 如果环境变量不存在,则使用默认 URL
iframe_html = """
<!DOCTYPE html>
<html>
<head>
<title>InternVL</title>
<style>
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<div style="text-align:center"> <h1><strong><font style=color:rgba(2200,10,10,1)>This space is currently under maintenance 😊😊</font></strong></h1></div>
<div style="text-align:center"><h2>We warmly welcome you to visit <a href="https://github.com/OpenGVLab/InternVL?tab=readme-ov-file#-internvl-family-closing-the-gap-to-commercial-multimodal-models-with-open-source-suites--a-pioneering-open-source-alternative-to-gpt-4o" target="_blank">Chat Demo</a> of InternVL2 if you’re interested 🎉🎉</br></h2></div>
<div style="text-align:center">
[<a href="https://internvl.github.io/blog/2024-07-02-InternVL-2.0/" target="_blank">📜 InternVL2 Blog</a>] |
[<a href="https://github.com/OpenGVLab/InternVL?tab=readme-ov-file#quick-start-with-huggingface" target="_blank">🚀 Quick Start</a>] |
[<a href="https://github.com/OpenGVLab/InternVL/blob/main/document/How_to_use_InternVL_API.md" target="_blank">🌐 API</a>]
</div>
</body>
</html>
"""
iframe_html = iframe_html.replace("{{backend_url}}", backend_url)
components.html(iframe_html, height=1200)