lferncastro commited on
Commit
d535ae2
·
1 Parent(s): 4ed4ac8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
app.py CHANGED
@@ -1,10 +1,17 @@
1
  import gradio as gr
2
 
 
 
 
3
 
 
 
 
4
 
5
-
6
- def greet(name):
7
- return "Hello " + name + "!!"
8
-
9
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
10
- iface.launch()
 
 
1
  import gradio as gr
2
 
3
+ def make_inference(query):
4
+ inference = shakespeare_qa.run(query)
5
+ return inference
6
 
7
+ if __name__ == "__main__":
8
+ # make a gradio interface
9
+ import gradio as gr
10
 
11
+ gr.Interface(
12
+ make_inference,
13
+ gr.inputs.Textbox(lines=2, label="Query"),
14
+ gr.outputs.Textbox(label="Response"),
15
+ title="Ask_Shakespeare",
16
+ description="️building_w_llms_qa_Shakespeare allows you to ask questions about the Shakespeare's plays.",
17
+ ).launch()