Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,22 +2,22 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
import os
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
#
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
#
|
| 20 |
-
|
| 21 |
|
| 22 |
# Now you can read your files from the cloned folder
|
| 23 |
|
|
|
|
| 2 |
|
| 3 |
import os
|
| 4 |
|
| 5 |
+
from huggingface_hub import Repository
|
| 6 |
+
import os
|
| 7 |
+
|
| 8 |
+
# Set the path to clone the repository
|
| 9 |
+
local_dir = "secret-csvs"
|
| 10 |
+
|
| 11 |
+
# Clone the repository
|
| 12 |
+
repo = Repository(
|
| 13 |
+
local_dir=local_dir,
|
| 14 |
+
repo_type="dataset",
|
| 15 |
+
clone_from="cathulyaprakash/vectorstore",
|
| 16 |
+
token=os.environ["hf_token"]
|
| 17 |
+
)
|
| 18 |
+
|
| 19 |
+
# Pull the latest changes
|
| 20 |
+
repo.git_pull()
|
| 21 |
|
| 22 |
# Now you can read your files from the cloned folder
|
| 23 |
|