Spaces:
Runtime error
Runtime error
File size: 376 Bytes
034c56f 4eb6974 24561e8 034c56f 4eb6974 9a1dd8e 4eb6974 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
import os
from huggingface_hub import HfApi
repo_id = "duypro247/TestScrape"
api = HfApi()
def restart_space():
if restart_button:
api.restart_space(repo_id=repo_id)
return "Space restarted!"
return "Space not restarted."
demo = gr.Blocks()
with demo:
b1=gr.Button("Restart Space")
b1.click(restart_space)
demo.launch() |