Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,8 @@ from huggingface_hub import HfApi, create_repo
|
|
10 |
import importlib
|
11 |
import os
|
12 |
|
|
|
|
|
13 |
# Initialize Flask app
|
14 |
app = Flask(__name__)
|
15 |
app.config['SECRET_KEY'] = 'your-secret-key'
|
@@ -286,7 +288,7 @@ def run_docker_container(image_name, port):
|
|
286 |
return container
|
287 |
|
288 |
def deploy_to_hf_spaces(project_name, token):
|
289 |
-
|
290 |
repo_url = create_repo(project_name, repo_type="space", space_sdk="streamlit", token=token)
|
291 |
api.upload_folder(
|
292 |
folder_path=".",
|
|
|
10 |
import importlib
|
11 |
import os
|
12 |
|
13 |
+
|
14 |
+
|
15 |
# Initialize Flask app
|
16 |
app = Flask(__name__)
|
17 |
app.config['SECRET_KEY'] = 'your-secret-key'
|
|
|
288 |
return container
|
289 |
|
290 |
def deploy_to_hf_spaces(project_name, token):
|
291 |
+
hf_api = HfApi()
|
292 |
repo_url = create_repo(project_name, repo_type="space", space_sdk="streamlit", token=token)
|
293 |
api.upload_folder(
|
294 |
folder_path=".",
|