arjunanand13 commited on
Commit
ae9cb06
·
verified ·
1 Parent(s): 638c5b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -12
app.py CHANGED
@@ -34,19 +34,31 @@ def process_input(Prompt,choice):
34
  else:
35
  return None , None , generate_image(Prompt)
36
 
37
- demo=gr.Blocks()
38
- with demo:
39
- with gr.Row():
40
- text_input = gr.Textbox()
41
- choice = gr.Radio(choices=["Chat","Music","Image"])
42
-
43
- with gr.Row():
44
- chatbot_output = gr.Textbox()
45
- music_output =gr.Audio()
46
- image_output =gr.Image()
47
 
48
- submit_btn = gr.Button("Generate")
49
 
50
- submit_btn.click(fn=process_input,inputs=[text_input,choice],outputs=[chatbot_output,music_output,image_output])
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  demo.launch(debug=True)
 
34
  else:
35
  return None , None , generate_image(Prompt)
36
 
37
+ # demo=gr.Blocks()
38
+ # with demo:
39
+ # with gr.Row():
40
+ # text_input = gr.Textbox()
41
+ # choice = gr.Radio(choices=["Chat","Music","Image"])
42
+
43
+ # with gr.Row():
44
+ # chatbot_output = gr.Textbox()
45
+ # music_output =gr.Audio()
46
+ # image_output =gr.Image()
47
 
48
+ # submit_btn = gr.Button("Generate")
49
 
50
+ # submit_btn.click(fn=process_input,inputs=[text_input,choice],outputs=[chatbot_output,music_output,image_output])
51
+
52
+ # demo.launch(debug=True)
53
+
54
+
55
+ demo =gr.Interface(
56
+ fn=process_input,
57
+ inputs=[gr.Textbox(),gr.Radio(["Chat","Music","Image"])],
58
+ outputs = [gr.Textbox(),gr.Audio(),gr.Image()],
59
+ # outputs =["text","audio","image"]
60
+ title="Multimodal Assistant"
61
+
62
+ )
63
 
64
  demo.launch(debug=True)