Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,12 +7,13 @@ nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
|
|
7 |
|
8 |
# dataset save ------------------------------------
|
9 |
import huggingface_hub
|
|
|
10 |
from huggingface_hub import Repository, hf_hub_download, upload_file
|
11 |
from datetime import datetime
|
12 |
# created new dataset as awacke1/MindfulStory.csv
|
13 |
-
DATASET_REPO_URL = "https://huggingface.co/datasets/awacke1/
|
14 |
-
DATASET_REPO_ID = "awacke1/
|
15 |
-
DATA_FILENAME = "
|
16 |
DATA_FILE = os.path.join("data", DATA_FILENAME)
|
17 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
18 |
# Download dataset repo using hub download
|
@@ -90,4 +91,6 @@ examples = [
|
|
90 |
['Pharmacy', 'What does a pharmacist do?']
|
91 |
]
|
92 |
|
93 |
-
gr.Interface(get_answer, inputs, outputs, title=title, description=description, article=article, examples=examples,
|
|
|
|
|
|
7 |
|
8 |
# dataset save ------------------------------------
|
9 |
import huggingface_hub
|
10 |
+
import os
|
11 |
from huggingface_hub import Repository, hf_hub_download, upload_file
|
12 |
from datetime import datetime
|
13 |
# created new dataset as awacke1/MindfulStory.csv
|
14 |
+
DATASET_REPO_URL = "https://huggingface.co/datasets/awacke1/WikipediaSearch"
|
15 |
+
DATASET_REPO_ID = "awacke1/WikipediaSearch.csv"
|
16 |
+
DATA_FILENAME = "WikipediaSearch.csv"
|
17 |
DATA_FILE = os.path.join("data", DATA_FILENAME)
|
18 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
19 |
# Download dataset repo using hub download
|
|
|
91 |
['Pharmacy', 'What does a pharmacist do?']
|
92 |
]
|
93 |
|
94 |
+
gr.Interface(get_answer, inputs, outputs, title=title, description=description, article=article, examples=examples,
|
95 |
+
article="Saved dataset: https://huggingface.co/datasets/awacke1/WikipediaSearch",
|
96 |
+
flagging_options=["strongly related","related", "neutral", "unrelated", "strongly unrelated"]).launch(share=False,enable_queue=False)
|