mohammad2928git commited on
Commit
827775a
1 Parent(s): 918125f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ def greet(question, model_type):
3
+ print(f"question is {question}")
4
+ if model_type == "with memory":
5
+ out_gen = "with memory"
6
+ else:
7
+ out_gen = "with out memory"
8
+
9
+ print(f"out is {out_gen}")
10
+ return out_gen
11
+
12
+ demo = gr.Interface(fn=greet, inputs=["text", gr.Dropdown(
13
+ ["with memory", "without memory"], label="Animal", info="Will add more animals later!"
14
+ ),], outputs="text")
15
+ demo.launch(debug=True, share=True)