Spaces:
Sleeping
Sleeping
Commit
·
05868c4
1
Parent(s):
6713a4c
Bugs fixed
Browse files- .gitignore +4 -1
- backend.py +3 -0
- tmp/answer.xlsx +0 -0
.gitignore
CHANGED
@@ -1 +1,4 @@
|
|
1 |
-
__pycache__
|
|
|
|
|
|
|
|
1 |
+
__pycache__
|
2 |
+
|
3 |
+
tmp
|
4 |
+
/tmp
|
backend.py
CHANGED
@@ -6,6 +6,7 @@ from fuzzywuzzy import process
|
|
6 |
import gradio as gr
|
7 |
import pandas as pd
|
8 |
import os,json
|
|
|
9 |
|
10 |
class Backend:
|
11 |
def __init__(self):
|
@@ -266,6 +267,7 @@ class Backend:
|
|
266 |
return file_name, question, self.answer, self.highlighted_out, highlighted_out_html, 'Please judge on the generated answer', 'Please judge on the generated answer', 'Still need to click the button above to save the results', None, None
|
267 |
|
268 |
def download_answer(self, path = './tmp', name = 'answer.xlsx'):
|
|
|
269 |
os.makedirs(path, exist_ok = True)
|
270 |
path = os.path.join(path, name)
|
271 |
# self.ori_answer_df['questions'] = self.questions
|
@@ -277,6 +279,7 @@ class Backend:
|
|
277 |
return path
|
278 |
|
279 |
def download_corrected(self, path = './tmp', name = 'corrected_answer.xlsx'):
|
|
|
280 |
os.makedirs(path, exist_ok = True)
|
281 |
path = os.path.join(path, name)
|
282 |
# self.answer_df['questions'] = self.questions
|
|
|
6 |
import gradio as gr
|
7 |
import pandas as pd
|
8 |
import os,json
|
9 |
+
import time
|
10 |
|
11 |
class Backend:
|
12 |
def __init__(self):
|
|
|
267 |
return file_name, question, self.answer, self.highlighted_out, highlighted_out_html, 'Please judge on the generated answer', 'Please judge on the generated answer', 'Still need to click the button above to save the results', None, None
|
268 |
|
269 |
def download_answer(self, path = './tmp', name = 'answer.xlsx'):
|
270 |
+
path = os.path.join(path,str(time.time()))
|
271 |
os.makedirs(path, exist_ok = True)
|
272 |
path = os.path.join(path, name)
|
273 |
# self.ori_answer_df['questions'] = self.questions
|
|
|
279 |
return path
|
280 |
|
281 |
def download_corrected(self, path = './tmp', name = 'corrected_answer.xlsx'):
|
282 |
+
path = os.path.join(path,str(time.time()))
|
283 |
os.makedirs(path, exist_ok = True)
|
284 |
path = os.path.join(path, name)
|
285 |
# self.answer_df['questions'] = self.questions
|
tmp/answer.xlsx
DELETED
Binary file (33.1 kB)
|
|