Spaces:
Sleeping
Sleeping
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="Memory status", info="With using memory, the output will be slow but strong" | |
),], outputs="text") | |
demo.launch(debug=True, share=True) | |