victoriaono commited on
Commit
4491624
·
verified ·
1 Parent(s): 918c711

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -23
app.py CHANGED
@@ -6,29 +6,29 @@ def yes_man(message, history):
6
  else:
7
  return "##Testing\n\n**bold**\n\n- List item"
8
 
9
- gr.ChatInterface(
10
- yes_man,
11
- chatbot=gr.Chatbot(height=300),
12
- textbox=gr.Textbox(placeholder="Ask me a yes or no question", container=False, scale=7),
13
- title="Yes Man",
14
- description="Ask Yes Man any question",
15
- theme="soft",
16
- examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],
17
- cache_examples=True,
18
- retry_btn=None,
19
- undo_btn="Delete Previous",
20
- clear_btn="Clear",
21
- ).launch()
22
 
23
- # def load():
24
- # return [
25
- # ("Here's an audio", gr.Audio("https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav")),
26
- # ("Here's an video", gr.Video("https://github.com/gradio-app/gradio/raw/main/demo/video_component/files/world.mp4"))
27
- # ]
28
 
29
- # with gr.Blocks() as demo:
30
- # chatbot = gr.Chatbot()
31
- # button = gr.Button("Load audio and video")
32
- # button.click(load, None, chatbot)
33
 
34
- # demo.launch()
 
6
  else:
7
  return "##Testing\n\n**bold**\n\n- List item"
8
 
9
+ # gr.ChatInterface(
10
+ # yes_man,
11
+ # chatbot=gr.Chatbot(height=300),
12
+ # textbox=gr.Textbox(placeholder="Ask me a yes or no question", container=False, scale=7),
13
+ # title="Yes Man",
14
+ # description="Ask Yes Man any question",
15
+ # theme="soft",
16
+ # examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],
17
+ # cache_examples=True,
18
+ # retry_btn=None,
19
+ # undo_btn="Delete Previous",
20
+ # clear_btn="Clear",
21
+ # ).launch()
22
 
23
+ def load():
24
+ return [
25
+ ("## Here's an audio", gr.Audio("https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav")),
26
+ ("Here's an video", gr.Video("https://github.com/gradio-app/gradio/raw/main/demo/video_component/files/world.mp4"))
27
+ ]
28
 
29
+ with gr.Blocks() as demo:
30
+ chatbot = gr.Chatbot()
31
+ button = gr.Button("Load audio and video")
32
+ button.click(load, None, chatbot)
33
 
34
+ demo.launch()