Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,8 @@ from transformers import Tool
|
|
| 5 |
from huggingface_hub import upload_folder
|
| 6 |
from huggingface_hub import create_repo
|
| 7 |
#from gradio import forms
|
|
|
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
def generate_files(title="Text Generation Tool", tool_description="This is a tool that chats with a user. "
|
|
@@ -96,7 +98,12 @@ def __call__(self, prompt: str):
|
|
| 96 |
|
| 97 |
create_repo(repo_id=tool_repo_id, repo_type="space", space_sdk = "gradio")
|
| 98 |
#repo_type="space"
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
# Upload the folder to the Hugging Face Hub
|
| 101 |
upload_folder(
|
| 102 |
folder_path=tool_class,
|
|
|
|
| 5 |
from huggingface_hub import upload_folder
|
| 6 |
from huggingface_hub import create_repo
|
| 7 |
#from gradio import forms
|
| 8 |
+
import time
|
| 9 |
+
|
| 10 |
|
| 11 |
|
| 12 |
def generate_files(title="Text Generation Tool", tool_description="This is a tool that chats with a user. "
|
|
|
|
| 98 |
|
| 99 |
create_repo(repo_id=tool_repo_id, repo_type="space", space_sdk = "gradio")
|
| 100 |
#repo_type="space"
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
# Sleep for 5 seconds
|
| 104 |
+
time.sleep(5)
|
| 105 |
+
|
| 106 |
+
print("Slept for 5 seconds!")
|
| 107 |
# Upload the folder to the Hugging Face Hub
|
| 108 |
upload_folder(
|
| 109 |
folder_path=tool_class,
|