Kimis Perros
commited on
Commit
·
7e6ba65
1
Parent(s):
6c5cdb8
UI tweaks
Browse files
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
| 2 |
title: SQuAD 2.0 QA System
|
| 3 |
-
colorFrom:
|
| 4 |
-
colorTo:
|
| 5 |
sdk: gradio
|
| 6 |
app_file: app.py
|
| 7 |
---
|
|
|
|
| 1 |
---
|
| 2 |
title: SQuAD 2.0 QA System
|
| 3 |
+
colorFrom: indigo
|
| 4 |
+
colorTo: slate
|
| 5 |
sdk: gradio
|
| 6 |
app_file: app.py
|
| 7 |
---
|
app.py
CHANGED
|
@@ -6,8 +6,6 @@ import gradio as gr
|
|
| 6 |
import sys
|
| 7 |
from pathlib import Path
|
| 8 |
|
| 9 |
-
print(f"Gradio version: {gr.__version__}")
|
| 10 |
-
|
| 11 |
# Add parent directory to Python path so as to load 'src' module
|
| 12 |
current_dir = Path(__file__).parent
|
| 13 |
sys.path.insert(0, str(current_dir))
|
|
@@ -56,11 +54,12 @@ demo = gr.Interface(
|
|
| 56 |
gr.Textbox(lines=8, placeholder="Enter context paragraph...", label="Context"),
|
| 57 |
gr.Textbox(placeholder="Enter your question...", label="Question"),
|
| 58 |
],
|
| 59 |
-
outputs=gr.Textbox(label="Answer", show_copy_button=True),
|
| 60 |
title="SQuAD 2.0 Question Answering",
|
| 61 |
description="BERT-base model fine-tuned on SQuAD 2.0 dataset",
|
| 62 |
allow_flagging="never",
|
| 63 |
deep_link=False, # hides the "Share via Link" button
|
|
|
|
| 64 |
)
|
| 65 |
|
| 66 |
if __name__ == "__main__":
|
|
|
|
| 6 |
import sys
|
| 7 |
from pathlib import Path
|
| 8 |
|
|
|
|
|
|
|
| 9 |
# Add parent directory to Python path so as to load 'src' module
|
| 10 |
current_dir = Path(__file__).parent
|
| 11 |
sys.path.insert(0, str(current_dir))
|
|
|
|
| 54 |
gr.Textbox(lines=8, placeholder="Enter context paragraph...", label="Context"),
|
| 55 |
gr.Textbox(placeholder="Enter your question...", label="Question"),
|
| 56 |
],
|
| 57 |
+
outputs=gr.Textbox(label="Answer", show_copy_button=True, lines=4),
|
| 58 |
title="SQuAD 2.0 Question Answering",
|
| 59 |
description="BERT-base model fine-tuned on SQuAD 2.0 dataset",
|
| 60 |
allow_flagging="never",
|
| 61 |
deep_link=False, # hides the "Share via Link" button
|
| 62 |
+
theme=gr.themes.Soft(primary_hue="indigo", neutral_hue="slate"),
|
| 63 |
)
|
| 64 |
|
| 65 |
if __name__ == "__main__":
|