Spaces:
Sleeping
Sleeping
nikhedward
commited on
Commit
•
594ecf0
1
Parent(s):
ffb42ee
Update app.py
Browse files
app.py
CHANGED
@@ -26,15 +26,30 @@ question2 = "When is the Khartoum reservation?"
|
|
26 |
|
27 |
|
28 |
key = "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"
|
29 |
-
|
30 |
-
"huggingface/" +
|
31 |
theme="dark-peach",
|
32 |
api_key = key,
|
33 |
examples = [[context1, question1],[context2, question2]],
|
34 |
css=".footer{display:none !important}",
|
35 |
-
inputs=[gr.Textbox(lines=7, default=context1, label="Context"), gr.inputs.Textbox(lines=2, default=question1, label="Question")],
|
36 |
-
outputs=[gr.Textbox(label="Answer"),gr.outputs.Textbox(label="Score")],
|
37 |
description=desc,
|
38 |
title=title
|
39 |
)
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
|
28 |
key = "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"
|
29 |
+
generator1 = gr.Interface.load(
|
30 |
+
"huggingface/" + "deepset/tinyroberta-squad2",
|
31 |
theme="dark-peach",
|
32 |
api_key = key,
|
33 |
examples = [[context1, question1],[context2, question2]],
|
34 |
css=".footer{display:none !important}",
|
35 |
+
#inputs=[gr.Textbox(lines=7, default=context1, label="Context"), gr.inputs.Textbox(lines=2, default=question1, label="Question")],
|
36 |
+
#outputs=[gr.Textbox(label="Answer"),gr.outputs.Textbox(label="Score")],
|
37 |
description=desc,
|
38 |
title=title
|
39 |
)
|
40 |
+
|
41 |
+
generator2 = gr.Interface.load(
|
42 |
+
"huggingface/" + "deepset/xlm-roberta-base-squad2",
|
43 |
+
theme="dark-peach",
|
44 |
+
api_key = key,
|
45 |
+
examples = [[context1, question1],[context2, question2]],
|
46 |
+
css=".footer{display:none !important}",
|
47 |
+
#inputs=[gr.Textbox(lines=7, default=context1, label="Context"), gr.inputs.Textbox(lines=2, default=question1, label="Question")],
|
48 |
+
#outputs=[gr.Textbox(label="Answer"),gr.outputs.Textbox(label="Score")],
|
49 |
+
description=desc,
|
50 |
+
title=title
|
51 |
+
|
52 |
+
|
53 |
+
gr.Parallel(generator1, generator2).launch()
|
54 |
+
|
55 |
+
#demo.launch()
|