Xkev commited on
Commit
bbe16f4
·
verified ·
1 Parent(s): 129beed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -70,8 +70,8 @@ def bot_streaming(message, history, max_new_tokens=250):
70
  generated_text_without_prompt = buffer
71
  time.sleep(0.01)
72
 
73
- buffer = re.sub(r"<(\w+)>", r"(Here begins the \1 stage)", buffer)
74
- buffer = re.sub(r"</(\w+)>", r"(Here ends the \1 stage)", buffer)
75
 
76
  yield buffer
77
 
@@ -89,7 +89,7 @@ demo = gr.ChatInterface(fn=bot_streaming, title="LLaVA-CoT",
89
  examples=[[{"text": "What is on the flower?", "files": ["./Example1.webp"]},512],
90
  [{"text": "How to make this pastry?", "files": ["./Example2.png"]},512]],
91
  cache_examples=False,
92
- description="Upload an image, and start chatting about it. To learn more about LLaVA-CoT, visit [our GitHub page](https://github.com/PKU-YuanGroup/LLaVA-CoT). Note: Since Gradio currently does not support displaying the special markings in the output, we have replaced it with the expression (Here begins the X phase).",
93
  stop_btn="Stop Generation",
94
  fill_height=True,
95
  multimodal=True)
 
70
  generated_text_without_prompt = buffer
71
  time.sleep(0.01)
72
 
73
+ buffer = re.sub(r"<(\w+)>", r"\<\1\>", buffer)
74
+ buffer = re.sub(r"</(\w+)>", r"\</\1\>", buffer)
75
 
76
  yield buffer
77
 
 
89
  examples=[[{"text": "What is on the flower?", "files": ["./Example1.webp"]},512],
90
  [{"text": "How to make this pastry?", "files": ["./Example2.png"]},512]],
91
  cache_examples=False,
92
+ description="Upload an image, and start chatting about it. To learn more about LLaVA-CoT, visit [our GitHub page](https://github.com/PKU-YuanGroup/LLaVA-CoT).",
93
  stop_btn="Stop Generation",
94
  fill_height=True,
95
  multimodal=True)