File size: 479 Bytes
827775a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
def greet(question, model_type):
    print(f"question is {question}")
    if model_type == "with memory":
        out_gen = "with memory"
    else:
        out_gen = "with out memory"

    print(f"out is {out_gen}")
    return out_gen

demo = gr.Interface(fn=greet, inputs=["text", gr.Dropdown(
            ["with memory", "without memory"], label="Animal", info="Will add more animals later!"
        ),], outputs="text")
demo.launch(debug=True, share=True)