Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -490,12 +490,17 @@ def main():
|
|
| 490 |
# with urllib.request.urlopen(DATASET_REPO_URL) as response:
|
| 491 |
# data = response.read()
|
| 492 |
|
| 493 |
-
with open('level2.json','w') as f:
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 499 |
|
| 500 |
df_final1.to_csv('predictions.csv')
|
| 501 |
csv_file = "predictions.csv"
|
|
|
|
| 490 |
# with urllib.request.urlopen(DATASET_REPO_URL) as response:
|
| 491 |
# data = response.read()
|
| 492 |
|
| 493 |
+
# with open('level2.json','w') as f:
|
| 494 |
+
# st.write(f.read())
|
| 495 |
+
# #st.write(f.write(json.dump(json_data)))
|
| 496 |
+
# #f.write(json.dump(json_data))
|
| 497 |
+
# json.dump(json_data, f)
|
| 498 |
+
with open('level2.json', "r+") as f:
|
| 499 |
+
data = f.read()
|
| 500 |
+
st.write(data)
|
| 501 |
+
f.seek(0)
|
| 502 |
+
f.write(json_data)
|
| 503 |
+
f.truncate()
|
| 504 |
|
| 505 |
df_final1.to_csv('predictions.csv')
|
| 506 |
csv_file = "predictions.csv"
|