duypro247 commited on
Commit
717621c
1 Parent(s): f90a5b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -15
app.py CHANGED
@@ -1,15 +1,6 @@
1
  import gradio as gr
2
  import os
3
- from huggingface_hub import HfApi
4
 
5
- repo_id = "duypro247/TestScrape"
6
- api = HfApi()
7
-
8
- def restart_space(restart_button):
9
- if restart_button:
10
- api.restart_space(repo_id=repo_id)
11
- return "Space restarted!"
12
- return "Space not restarted."
13
 
14
  username_1=os.getenv('username_1')
15
  username_2=os.getenv('username_2')
@@ -17,12 +8,7 @@ password_1=os.getenv('password_1')
17
  password_2=os.getenv('password_2')
18
 
19
  hf_token=os.getenv('hf_token')
20
- iface = gr.load("duypro247/TestScrape",src="spaces",hf_token=hf_token)
21
 
22
- iface = gr.Interface(
23
- fn=restart_space,
24
- inputs=gr.Button(label="Restart Space"),
25
- outputs="text"
26
- )
27
 
28
  iface.launch(auth=[(username_1,password_1 ), (username_2, password_2)])
 
1
  import gradio as gr
2
  import os
 
3
 
 
 
 
 
 
 
 
 
4
 
5
  username_1=os.getenv('username_1')
6
  username_2=os.getenv('username_2')
 
8
  password_2=os.getenv('password_2')
9
 
10
  hf_token=os.getenv('hf_token')
 
11
 
12
+ iface = gr.load("duypro247/TestScrape",src="spaces",hf_token=hf_token)
 
 
 
 
13
 
14
  iface.launch(auth=[(username_1,password_1 ), (username_2, password_2)])