Spaces:
Sleeping
Sleeping
deema
commited on
Commit
·
cc0fd9e
1
Parent(s):
26adeef
exit if not saved
Browse files- app.py +0 -1
- database.py +2 -1
app.py
CHANGED
|
@@ -109,7 +109,6 @@ def rank_interface():
|
|
| 109 |
user_rankings.append((model, j)) # j is the rank (1, 2, or 3)
|
| 110 |
break
|
| 111 |
process_rankings(user_rankings)
|
| 112 |
-
return "سجلنا ردك، ما قصرت =)"
|
| 113 |
|
| 114 |
return gr.Interface(fn=rank_fluency, inputs=inputs, outputs=outputs, title="ترتيب فصاحة النماذج",
|
| 115 |
description=".لديك مجموعة من الأسئلة، الرجاء ترتيب إجابات كل سؤال حسب جودة و فصاحة الإجابة", css=css)
|
|
|
|
| 109 |
user_rankings.append((model, j)) # j is the rank (1, 2, or 3)
|
| 110 |
break
|
| 111 |
process_rankings(user_rankings)
|
|
|
|
| 112 |
|
| 113 |
return gr.Interface(fn=rank_fluency, inputs=inputs, outputs=outputs, title="ترتيب فصاحة النماذج",
|
| 114 |
description=".لديك مجموعة من الأسئلة، الرجاء ترتيب إجابات كل سؤال حسب جودة و فصاحة الإجابة", css=css)
|
database.py
CHANGED
|
@@ -17,9 +17,10 @@ def save_response(response_data):
|
|
| 17 |
try:
|
| 18 |
# Insert the response data into the collection
|
| 19 |
collection.insert_one(response_data)
|
| 20 |
-
|
| 21 |
except Exception as e:
|
| 22 |
print(f"An error occurred: {e}")
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
def read_responses(filter_query=None):
|
|
|
|
| 17 |
try:
|
| 18 |
# Insert the response data into the collection
|
| 19 |
collection.insert_one(response_data)
|
| 20 |
+
return "سجلنا ردك، ما قصرت =)"
|
| 21 |
except Exception as e:
|
| 22 |
print(f"An error occurred: {e}")
|
| 23 |
+
exit(0)
|
| 24 |
|
| 25 |
|
| 26 |
def read_responses(filter_query=None):
|