Spaces:
Running
on
Zero
Running
on
Zero
khang119966
commited on
Commit
•
6155e84
1
Parent(s):
9f876d1
Update app.py
Browse files
app.py
CHANGED
@@ -146,14 +146,20 @@ def chat(message, history):
|
|
146 |
time.sleep(0.01)
|
147 |
yield generated_text_without_prompt
|
148 |
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
demo.queue().launch()
|
|
|
146 |
time.sleep(0.01)
|
147 |
yield generated_text_without_prompt
|
148 |
|
149 |
+
CSS ="""
|
150 |
+
.contain { display: flex; flex-direction: column; }
|
151 |
+
#component-0 { height: 100%; }
|
152 |
+
#chatbot { flex-grow: 1; }
|
153 |
+
"""
|
154 |
+
|
155 |
+
with gr.Blocks(css=CSS) as demo:
|
156 |
+
chatbot = gr.ChatInterface(
|
157 |
+
fn=chat,
|
158 |
+
description="""Try [Vintern-1B](https://huggingface.co/5CD-AI/Viet-InternVL2-1B) in this demo. Vintern 1B is a multimodal large language model series, featuring models of various sizes. For each size, we release instruction-tuned models optimized for multimodal tasks. Vintern-1B consists of [InternViT-300M-448px](https://huggingface.co/OpenGVLab/InternViT-300M-448px), an MLP projector, and [Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct).""",
|
159 |
+
examples=[{"text": "Mô tả hình ảnh.", "files":["./demo_3.jpg"]},
|
160 |
+
{"text": "Trích xuất các thông tin từ ảnh.", "files":["./demo_1.jpg"]},
|
161 |
+
{"text": "Mô tả hình ảnh một cách chi tiết.", "files":["./demo_2.jpg"]}],
|
162 |
+
title="❄️ Vintern-1B ❄️",
|
163 |
+
multimodal=True,
|
164 |
+
)
|
165 |
demo.queue().launch()
|