Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,14 +5,16 @@ from huggingface_hub import HfApi
|
|
5 |
repo_id = "duypro247/TestScrape"
|
6 |
api = HfApi()
|
7 |
|
8 |
-
def restart_space(
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
|
14 |
iface = gr.Interface(
|
15 |
fn=restart_space,
|
16 |
-
inputs=gr.
|
17 |
-
outputs="
|
18 |
)
|
|
|
|
|
|
5 |
repo_id = "duypro247/TestScrape"
|
6 |
api = HfApi()
|
7 |
|
8 |
+
def restart_space():
|
9 |
+
api.restart_space(repo_id=repo_id)
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
|
14 |
iface = gr.Interface(
|
15 |
fn=restart_space,
|
16 |
+
inputs=gr.Button(label="Restart Space"),
|
17 |
+
inputs.click(restart_space(),outputs="Space Restarted")
|
18 |
)
|
19 |
+
|
20 |
+
iface.lanch()
|