Spaces:
Sleeping
Sleeping
Update app_web.py
Browse files- app_web.py +2 -3
app_web.py
CHANGED
|
@@ -260,8 +260,7 @@ def render_chat():
|
|
| 260 |
"explain the do-file":"explain",
|
| 261 |
"suggest fix(es) for any errors in the do-file":"suggestfix"}
|
| 262 |
# Accept .do files
|
| 263 |
-
uploaded_file =
|
| 264 |
-
|
| 265 |
if uploaded_file is not None:
|
| 266 |
# Define the full file path on disk
|
| 267 |
file_path = os.path.join(save_dir, uploaded_file.name)
|
|
@@ -270,7 +269,7 @@ def render_chat():
|
|
| 270 |
with open(file_path, "wb") as f:
|
| 271 |
f.write(uploaded_file.getbuffer())
|
| 272 |
|
| 273 |
-
st.success(f"File successfully uploaded")
|
| 274 |
|
| 275 |
if qcat_result.get("action") == "code":
|
| 276 |
options = {"rewrite the stata code":"rewrite",
|
|
|
|
| 260 |
"explain the do-file":"explain",
|
| 261 |
"suggest fix(es) for any errors in the do-file":"suggestfix"}
|
| 262 |
# Accept .do files
|
| 263 |
+
uploaded_file = uploaded_files[0]
|
|
|
|
| 264 |
if uploaded_file is not None:
|
| 265 |
# Define the full file path on disk
|
| 266 |
file_path = os.path.join(save_dir, uploaded_file.name)
|
|
|
|
| 269 |
with open(file_path, "wb") as f:
|
| 270 |
f.write(uploaded_file.getbuffer())
|
| 271 |
|
| 272 |
+
# st.success(f"File successfully uploaded")
|
| 273 |
|
| 274 |
if qcat_result.get("action") == "code":
|
| 275 |
options = {"rewrite the stata code":"rewrite",
|