hmb HF staff commited on
Commit
e66c1a8
·
verified ·
1 Parent(s): 74aa30a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -6
app.py CHANGED
@@ -33,11 +33,19 @@ with gr.Blocks(fill_height=True) as demo:
33
  bubble_full_width=False,
34
  scale=1,
35
  placeholder='<h1 style="font-weight: bold; color: #FFFFFF; text-align: center; font-size: 48px; font-family: Arial, sans-serif;">Welcome to Gradio!</h1>',
36
- examples=[{"icon": "https://i.insider.com/5df14d0ee94e860668396b82?width=2000&format=jpeg&auto=webp", "https://i.insider.com/5df14d0ee94e860668396b82?width=2000&format=jpeg&auto=webp"), "display_text": "Display Text Here!", "text": "Try this example with this audio.", "files": [os.path.join(os.path.dirname(__file__), "files/cantina.wav")]},
37
- {"text": "Try this example with this image.", "files": ["https://i.insider.com/5df14d0ee94e860668396b82?width=2000&format=jpeg&auto=webp", "https://i.insider.com/5df14d0ee94e860668396b82?width=2000&format=jpeg&auto=webp")]},
38
- {"text": "This is just text, no files!"},
39
- {"text": "Try this example with this image.", "files": ["https://i.insider.com/5df14d0ee94e860668396b82?width=2000&format=jpeg&auto=webp", "https://i.insider.com/5df14d0ee94e860668396b82?width=2000&format=jpeg&auto=webp"), os.path.join(os.path.dirname(__file__), "https://i.insider.com/5df14d0ee94e860668396b82?width=2000&format=jpeg&auto=webp")]},
40
- {"text": "Try this example with this Audio.", "files": ["https://i.insider.com/5df14d0ee94e860668396b82?width=2000&format=jpeg&auto=webp", "files/cantina.wav")]}
 
 
 
 
 
 
 
 
41
  )
42
 
43
  chat_input = gr.MultimodalTextbox(interactive=True,
@@ -52,4 +60,4 @@ with gr.Blocks(fill_height=True) as demo:
52
  chatbot.example_select(append_example_message, [chatbot], [chatbot]).then(respond, chatbot, chatbot, api_name="respond")
53
 
54
  if __name__ == "__main__":
55
- demo.launch()
 
33
  bubble_full_width=False,
34
  scale=1,
35
  placeholder='<h1 style="font-weight: bold; color: #FFFFFF; text-align: center; font-size: 48px; font-family: Arial, sans-serif;">Welcome to Gradio!</h1>',
36
+ examples=[
37
+ {"icon": "https://images.pexels.com/photos/1108099/pexels-photo-1108099.jpeg",
38
+ "display_text": "Display Text Here!",
39
+ "text": "Try this example with this audio.",
40
+ "files": [os.path.join(os.path.dirname(__file__), "files/cantina.wav")]},
41
+ {"text": "Try this example with this image.",
42
+ "files": ["https://images.pexels.com/photos/1108099/pexels-photo-1108099.jpeg"]},
43
+ {"text": "This is just text, no files!"},
44
+ {"text": "Try this example with this image.",
45
+ "files": ["https://images.pexels.com/photos/1108099/pexels-photo-1108099.jpeg"]},
46
+ {"text": "Try this example with this Audio.",
47
+ "files": ["https://images.pexels.com/photos/1108099/pexels-photo-1108099.jpeg", "files/cantina.wav"]}
48
+ ]
49
  )
50
 
51
  chat_input = gr.MultimodalTextbox(interactive=True,
 
60
  chatbot.example_select(append_example_message, [chatbot], [chatbot]).then(respond, chatbot, chatbot, api_name="respond")
61
 
62
  if __name__ == "__main__":
63
+ demo.launch()