Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,15 +41,16 @@ def answer_question(query):
|
|
41 |
return(hp_qa.run(query))
|
42 |
|
43 |
if __name__ == "main":
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
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()
|