ysharma HF staff commited on
Commit
b519057
·
verified ·
1 Parent(s): 802c092

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -86,6 +86,7 @@ def bot_streaming(message, history):
86
 
87
 
88
  chatbot=gr.Chatbot(placeholder=PLACEHOLDER,scale=1)
 
89
  with gr.Blocks(fill_height=True, ) as demo:
90
  gr.ChatInterface(
91
  fn=bot_streaming,
@@ -94,7 +95,8 @@ with gr.Blocks(fill_height=True, ) as demo:
94
  {"text": "How to make this pastry?", "files": ["./baklava.png"]}],
95
  description="Try [LLaVA Llama-3-8B](https://huggingface.co/xtuner/llava-llama-3-8b-v1_1-transformers). Upload an image and start chatting about it, or simply try one of the examples below. If you don't upload an image, you will receive an error.",
96
  stop_btn="Stop Generation",
97
- multimodal=True,
 
98
  chatbot=chatbot,
99
  )
100
 
 
86
 
87
 
88
  chatbot=gr.Chatbot(placeholder=PLACEHOLDER,scale=1)
89
+ chat_input = gr.MultimodalTextbox(interactive=True, file_types=["image"], placeholder="Enter message or upload file...", show_label=False)
90
  with gr.Blocks(fill_height=True, ) as demo:
91
  gr.ChatInterface(
92
  fn=bot_streaming,
 
95
  {"text": "How to make this pastry?", "files": ["./baklava.png"]}],
96
  description="Try [LLaVA Llama-3-8B](https://huggingface.co/xtuner/llava-llama-3-8b-v1_1-transformers). Upload an image and start chatting about it, or simply try one of the examples below. If you don't upload an image, you will receive an error.",
97
  stop_btn="Stop Generation",
98
+ multimodal=True,
99
+ textbox=chat_input,
100
  chatbot=chatbot,
101
  )
102