Spaces:
Runtime error
Runtime error
Commit
·
d535ae2
1
Parent(s):
4ed4ac8
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,17 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
| 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()
|