Spaces:
Sleeping
Sleeping
Dhrumit1314
commited on
Commit
•
585c9f5
1
Parent(s):
bac84ae
Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,14 @@ def upload_video():
|
|
76 |
token = folder.get_token()
|
77 |
|
78 |
# Specify your namespace (username or organization name)
|
79 |
-
namespace = "Dhrumit1314"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
# Upload the video file
|
82 |
video_file_id = api.upload_file(
|
|
|
76 |
token = folder.get_token()
|
77 |
|
78 |
# Specify your namespace (username or organization name)
|
79 |
+
namespace = "Dhrumit1314/videoUpload"
|
80 |
+
|
81 |
+
# Check if the repository exists
|
82 |
+
try:
|
83 |
+
api.repo_info(namespace)
|
84 |
+
except HTTPError:
|
85 |
+
# If the repository does not exist, create it
|
86 |
+
api.create_repo(token=token, name="videoUpload", owner="Dhrumit1314")
|
87 |
|
88 |
# Upload the video file
|
89 |
video_file_id = api.upload_file(
|