Spaces:
Sleeping
Sleeping
File size: 371 Bytes
33af249 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
import os
from huggingface_hub import HfApi
hf_token = os.getenv('hf_token')
repo_id = "duypro247/VNAScrape"
api = HfApi()
def restart_space():
space_runtime = api.restart_space(repo_id=repo_id, token=hf_token)
demo = gr.Blocks()
with demo:
text = gr.Textbox()
b1 = gr.Button("Restart Space")
b1.click(restart_space)
demo.launch() |