Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- app.py +1 -1
- data_processing.py +6 -6
app.py
CHANGED
|
@@ -14,7 +14,7 @@ st.markdown(
|
|
| 14 |
<style>
|
| 15 |
.stTextArea textarea {
|
| 16 |
background-color: white !important;
|
| 17 |
-
font-size:
|
| 18 |
color: black !important;
|
| 19 |
}
|
| 20 |
</style>
|
|
|
|
| 14 |
<style>
|
| 15 |
.stTextArea textarea {
|
| 16 |
background-color: white !important;
|
| 17 |
+
font-size: 20px !important;
|
| 18 |
color: black !important;
|
| 19 |
}
|
| 20 |
</style>
|
data_processing.py
CHANGED
|
@@ -154,11 +154,11 @@ def save_recent_question(question, response_time):
|
|
| 154 |
"response_time": response_time
|
| 155 |
})
|
| 156 |
|
| 157 |
-
|
| 158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
-
# Write back to file
|
| 161 |
-
with open(RECENT_QUESTIONS_FILE, "w") as file:
|
| 162 |
-
json.dump(data, file, indent=4)
|
| 163 |
-
|
| 164 |
|
|
|
|
| 154 |
"response_time": response_time
|
| 155 |
})
|
| 156 |
|
| 157 |
+
# Keep only the last 5 questions
|
| 158 |
+
data["questions"] = data["questions"][-5:]
|
| 159 |
+
|
| 160 |
+
# Write back to file
|
| 161 |
+
with open(RECENT_QUESTIONS_FILE, "w") as file:
|
| 162 |
+
json.dump(data, file, indent=4)
|
| 163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
|