Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
16 |
MODEL_ID = os.environ.get("MODEL_ID")
|
17 |
MODEL_NAME = MODEL_ID.split("/")[-1]
|
18 |
|
19 |
-
TITLE = "<h1>
|
20 |
|
21 |
DESCRIPTION = f"""
|
22 |
<center>
|
@@ -27,15 +27,12 @@ DESCRIPTION = f"""
|
|
27 |
β¨ Tips: Now you can send DM or upload IMAGE/FILE per time.
|
28 |
<br>
|
29 |
π€ Supported Format: pdf, txt, docx, pptx, md, png, jpg, webp
|
30 |
-
</p
|
|
|
|
|
|
|
31 |
|
32 |
CSS = """
|
33 |
-
.duplicate-button {
|
34 |
-
margin: auto !important;
|
35 |
-
color: white !important;
|
36 |
-
background: black !important;
|
37 |
-
border-radius: 100vh !important;
|
38 |
-
}
|
39 |
h1 {
|
40 |
text-align: center;
|
41 |
display: block;
|
@@ -162,7 +159,7 @@ def stream_chat(message, history: list, temperature: float, max_length: int, top
|
|
162 |
|
163 |
|
164 |
|
165 |
-
chatbot = gr.Chatbot(
|
166 |
chat_input = gr.MultimodalTextbox(
|
167 |
interactive=True,
|
168 |
placeholder="Enter message or upload a file one time...",
|
@@ -175,10 +172,9 @@ EXAMPLES = [
|
|
175 |
[{"text": "Is it real?", "files": ["./spacecat.png"]}]
|
176 |
]
|
177 |
|
178 |
-
with gr.Blocks(css=CSS, theme="soft") as demo:
|
179 |
gr.HTML(TITLE)
|
180 |
gr.HTML(DESCRIPTION)
|
181 |
-
gr.DuplicateButton(value="Duplicate Space for private use", elem_classes="duplicate-button")
|
182 |
gr.ChatInterface(
|
183 |
fn=stream_chat,
|
184 |
multimodal=True,
|
|
|
16 |
MODEL_ID = os.environ.get("MODEL_ID")
|
17 |
MODEL_NAME = MODEL_ID.split("/")[-1]
|
18 |
|
19 |
+
TITLE = "<h1>VL-Chatbox</h1>"
|
20 |
|
21 |
DESCRIPTION = f"""
|
22 |
<center>
|
|
|
27 |
β¨ Tips: Now you can send DM or upload IMAGE/FILE per time.
|
28 |
<br>
|
29 |
π€ Supported Format: pdf, txt, docx, pptx, md, png, jpg, webp
|
30 |
+
</p>
|
31 |
+
<br>
|
32 |
+
<p>πββοΈ May be rebuilding from time to time during coding</p>
|
33 |
+
</center>"""
|
34 |
|
35 |
CSS = """
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
h1 {
|
37 |
text-align: center;
|
38 |
display: block;
|
|
|
159 |
|
160 |
|
161 |
|
162 |
+
chatbot = gr.Chatbot()
|
163 |
chat_input = gr.MultimodalTextbox(
|
164 |
interactive=True,
|
165 |
placeholder="Enter message or upload a file one time...",
|
|
|
172 |
[{"text": "Is it real?", "files": ["./spacecat.png"]}]
|
173 |
]
|
174 |
|
175 |
+
with gr.Blocks(css=CSS, theme="soft",fill_height=True) as demo:
|
176 |
gr.HTML(TITLE)
|
177 |
gr.HTML(DESCRIPTION)
|
|
|
178 |
gr.ChatInterface(
|
179 |
fn=stream_chat,
|
180 |
multimodal=True,
|