Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
username_1=os.getenv('username_1')
|
4 |
username_2=os.getenv('username_2')
|
5 |
password_1=os.getenv('password_1')
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
+
from huggingface_hub import HfApi
|
4 |
+
|
5 |
+
repo_id = "duypro247/TestScrape"
|
6 |
+
api = HfApi()
|
7 |
+
btn=gr.Button(label="Restart Space") # new button
|
8 |
+
|
9 |
+
def restart_space():
|
10 |
+
api.restart_space(repo_id=repo_id)
|
11 |
+
|
12 |
+
btn.click(restart_space)
|
13 |
+
|
14 |
username_1=os.getenv('username_1')
|
15 |
username_2=os.getenv('username_2')
|
16 |
password_1=os.getenv('password_1')
|