khang119966 commited on
Commit
6c0f8b1
·
verified ·
1 Parent(s): 624cfa6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -21
app.py CHANGED
@@ -240,25 +240,26 @@ function forceLightTheme() {
240
  }
241
  """
242
 
243
- with demo:
244
- mic_transcribe = gr.Interface(
245
- fn=transcribe_speech,
246
- inputs=gr.Audio(sources="microphone", type="filepath"),
247
- outputs=gr.components.Textbox(),
248
- )
249
-
250
- chat_demo_interface = gr.ChatInterface(
251
- fn=chat,
252
- description="""**Vintern-1B-v3.5** is the latest in the Vintern series, bringing major improvements over v2 across all benchmarks. 🚀 Fine-tuned from **InternVL-2.5-1B**, already strong in Vietnamese 🇻🇳 tasks thanks to Viet-ShareGPT-4o-Text-VQA data. This **continuous fine-tuning Version** enhances Vietnamese capabilities while retaining strong English performance. It excels in OCR, text recognition, and Vietnam-specific document understanding. 📄 However, users should be mindful of **potential biases** due to the training data. ⚠️""",
253
- examples=[{"text": "Hãy viết một email giới thiệu sản phẩm trong ảnh.", "files":["./demo_3.jpg"]},
254
- {"text": "Trích xuất các thông tin từ ảnh trả về markdown.", "files":["./demo_1.jpg"]},
255
- {"text": "Bạn là nhân viên marketing chuyên nghiệp. Hãy viết một bài quảng cáo dài trên mạng xã hội giới thiệu về cửa hàng.", "files":["./demo_2.jpg"]},
256
- {"text": "Trích xuất thông tin kiện hàng trong ảnh và trả về dạng JSON.", "files":["./demo_4.jpg"]}],
257
- title="❄️ Vintern-1B-v3.5 Demo ❄️",
258
- multimodal=True,
259
- css=CSS,
260
- js=js,
261
- theme='NoCrypt/miku'
262
- )
 
263
 
264
- demo.queue().launch()
 
240
  }
241
  """
242
 
243
+ demo = gr.Blocks()
244
+
245
+ chat_demo_interface = gr.ChatInterface(
246
+ fn=chat,
247
+ description="""**Vintern-1B-v3.5** is the latest in the Vintern series, bringing major improvements over v2 across all benchmarks. 🚀 Fine-tuned from **InternVL-2.5-1B**, already strong in Vietnamese 🇻🇳 tasks thanks to Viet-ShareGPT-4o-Text-VQA data. This **continuous fine-tuning Version** enhances Vietnamese capabilities while retaining strong English performance. It excels in OCR, text recognition, and Vietnam-specific document understanding. 📄 However, users should be mindful of **potential biases** due to the training data. ⚠️""",
248
+ examples=[{"text": "Hãy viết một email giới thiệu sản phẩm trong ảnh.", "files":["./demo_3.jpg"]},
249
+ {"text": "Trích xuất các thông tin từ ảnh trả về markdown.", "files":["./demo_1.jpg"]},
250
+ {"text": "Bạn là nhân viên marketing chuyên nghiệp. Hãy viết một bài quảng cáo dài trên mạng xã hội giới thiệu về cửa hàng.", "files":["./demo_2.jpg"]},
251
+ {"text": "Trích xuất thông tin kiện hàng trong ảnh và trả về dạng JSON.", "files":["./demo_4.jpg"]}],
252
+ title="❄️ Vintern-1B-v3.5 Demo ❄️",
253
+ multimodal=True,
254
+ css=CSS,
255
+ js=js,
256
+ theme='NoCrypt/miku'
257
+ )
258
+
259
+ mic_transcribe = gr.Interface(
260
+ fn=transcribe_speech,
261
+ inputs=gr.Audio(sources="microphone", type="filepath"),
262
+ outputs=gr.components.Textbox(),
263
+ )
264
 
265
+ demo.queue().launch()