kmirijan commited on
Commit
8301a37
1 Parent(s): da528ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -41,15 +41,16 @@ def answer_question(query):
41
  return(hp_qa.run(query))
42
 
43
  if __name__ == "main":
44
- import gradio as gr
45
-
46
- gr.Interface(
47
- answer_question,
48
- [
49
- gr.inputs.Textbox(lines=2, label="Query"),
50
- ],
51
- gr.outputs.Textbox(label="Response"),
52
- title="Ask Harry Potter",
53
- description=""" Ask Harry Potter is a tool that let's you ask a question with
54
- the books' text as reference""",
55
- ).launch()
 
 
41
  return(hp_qa.run(query))
42
 
43
  if __name__ == "main":
44
+ import gradio as gr
45
+ print(answer_question("Who is Harry's Father"))
46
+
47
+ gr.Interface(
48
+ answer_question,
49
+ [
50
+ gr.inputs.Textbox(lines=2, label="Query"),
51
+ ],
52
+ gr.outputs.Textbox(label="Response"),
53
+ title="Ask Harry Potter",
54
+ description=""" Ask Harry Potter is a tool that let's you ask a question with
55
+ the books' text as reference"""
56
+ ).launch()