ysharma HF Staff commited on
Commit
65b77dc
·
verified ·
1 Parent(s): aab5615

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -85,17 +85,18 @@ def bot_streaming(message, history):
85
  yield generated_text_without_prompt
86
 
87
 
88
- demo = gr.ChatInterface(
 
 
89
  fn=bot_streaming,
90
- fill_height=True,
91
  title="LLaVA Llama-3-8B",
92
  examples=[{"text": "What is on the flower?", "files": ["./bee.jpg"]},
93
  {"text": "How to make this pastry?", "files": ["./baklava.png"]}],
94
  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.",
95
  stop_btn="Stop Generation",
96
  multimodal=True,
97
- placeholder=PLACEHOLDER,
98
- )
99
 
100
  demo.queue(api_open=False)
101
  demo.launch(show_api=False, share=False)
 
85
  yield generated_text_without_prompt
86
 
87
 
88
+ chatbot=gr.Chatbot(placeholder=PLACEHOLDER,)
89
+ with gr.Blocks(fill_height=True, scale=1) as demo:
90
+ gr.ChatInterface(
91
  fn=bot_streaming,
 
92
  title="LLaVA Llama-3-8B",
93
  examples=[{"text": "What is on the flower?", "files": ["./bee.jpg"]},
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
 
101
  demo.queue(api_open=False)
102
  demo.launch(show_api=False, share=False)