Jiaqi-hkust commited on
Commit
dec594a
·
verified ·
1 Parent(s): dfe5589

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -205,10 +205,17 @@ additional_inputs = [
205
  gr.Slider(minimum=128, maximum=4096, value=1024, step=128, label="Max New Tokens"),
206
  ]
207
 
 
 
 
 
 
 
 
208
  # 创建 Interface
209
  demo = gr.ChatInterface(
210
  fn=respond,
211
- type="messages", # 使用标准的 OpenAI 格式历史记录 [cite: 24]
212
  multimodal=True, # 启用多模态上传
213
  title="🤖 Robust-R1: Degradation-Aware Reasoning",
214
  description="Upload an image and ask questions. The model considers image degradations during reasoning.",
 
205
  gr.Slider(minimum=128, maximum=4096, value=1024, step=128, label="Max New Tokens"),
206
  ]
207
 
208
+ chatbot_component = gr.Chatbot(
209
+ type="messages",
210
+ label="Robust-R1 Chat",
211
+ avatar_images=(None, "https://api.dicebear.com/7.x/bottts/svg?seed=Qwen"),
212
+ height=650
213
+ )
214
+
215
  # 创建 Interface
216
  demo = gr.ChatInterface(
217
  fn=respond,
218
+ chatbot=chatbot_component, # <--- 这里传入自定义的 chatbot
219
  multimodal=True, # 启用多模态上传
220
  title="🤖 Robust-R1: Degradation-Aware Reasoning",
221
  description="Upload an image and ask questions. The model considers image degradations during reasoning.",