Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -124,6 +124,15 @@ def create_and_push(space_type, hardware, private_space, other_model_name, radio
|
|
| 124 |
# 5. Delete the app.py file
|
| 125 |
os.remove("app.py")
|
| 126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
return f"""Successfully created space at: <a href="{repo_url}" target="_blank">{repo_url}</a>"""
|
| 128 |
|
| 129 |
except Exception as e:
|
|
|
|
| 124 |
# 5. Delete the app.py file
|
| 125 |
os.remove("app.py")
|
| 126 |
|
| 127 |
+
# Hacking for hackathon. Revert to old gradio version in README.md
|
| 128 |
+
api.upload_file(
|
| 129 |
+
path_or_fileobj="README.md",
|
| 130 |
+
path_in_repo="README.md",
|
| 131 |
+
repo_id=model_id,
|
| 132 |
+
token=token,
|
| 133 |
+
repo_type="space",
|
| 134 |
+
)
|
| 135 |
+
|
| 136 |
return f"""Successfully created space at: <a href="{repo_url}" target="_blank">{repo_url}</a>"""
|
| 137 |
|
| 138 |
except Exception as e:
|