Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,8 @@ See https://github.com/openai/openai-python/blob/main/chatml.md for information
|
|
44 |
|
45 |
def read_tasks(cache_file=None):
|
46 |
#from make_qas import input_dir
|
47 |
-
from make_qas_comparison import input_dir
|
|
|
48 |
file = f"{input_dir}/qas.json"
|
49 |
with open(file, "r", encoding="utf-8") as f:
|
50 |
qas = json.loads(f.read())
|
@@ -160,7 +161,8 @@ def download(access_key):
|
|
160 |
file_ret = gr.File.update(value=None, visible=False)
|
161 |
else:
|
162 |
chatbot_ret = [(f"Your entered Access Key is correct.", f"The file containing all processed query-responses ({len(qas)} in total) can be downloaded below.")]
|
163 |
-
from make_qas import input_dir
|
|
|
164 |
filename = f"{input_dir}/qas-{len(qas)}.json"
|
165 |
with open(filename, "w", encoding="utf-8") as f:
|
166 |
f.write(json.dumps(qas, ensure_ascii=False, indent=4))
|
|
|
44 |
|
45 |
def read_tasks(cache_file=None):
|
46 |
#from make_qas import input_dir
|
47 |
+
#from make_qas_comparison import input_dir
|
48 |
+
input_dir = "."
|
49 |
file = f"{input_dir}/qas.json"
|
50 |
with open(file, "r", encoding="utf-8") as f:
|
51 |
qas = json.loads(f.read())
|
|
|
161 |
file_ret = gr.File.update(value=None, visible=False)
|
162 |
else:
|
163 |
chatbot_ret = [(f"Your entered Access Key is correct.", f"The file containing all processed query-responses ({len(qas)} in total) can be downloaded below.")]
|
164 |
+
#from make_qas import input_dir
|
165 |
+
input_dir = "."
|
166 |
filename = f"{input_dir}/qas-{len(qas)}.json"
|
167 |
with open(filename, "w", encoding="utf-8") as f:
|
168 |
f.write(json.dumps(qas, ensure_ascii=False, indent=4))
|