xp3857 commited on
Commit
3353a40
1 Parent(s): ad1a1ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -1,5 +1,18 @@
1
  import gradio as gr
 
2
  import os
 
 
 
 
 
 
 
 
 
 
 
 
3
  name = "runwayml/stable-diffusion-v1-5"
4
  model = gr.Interface.load(f"models/{name}")
5
  o = os.getenv("P")
 
1
  import gradio as gr
2
+ import requests
3
  import os
4
+
5
+ user = "user1"
6
+ password = "pass1"
7
+ session = requests.Session()
8
+ session.auth = (user, password)
9
+ hostname = "huggingface.co/spaces/xp3857/text-to-image"
10
+
11
+ auth = session.post('http://' + hostname)
12
+ response = session.get('http://' + hostname + '/rest/applications')
13
+ print auth
14
+ print response
15
+
16
  name = "runwayml/stable-diffusion-v1-5"
17
  model = gr.Interface.load(f"models/{name}")
18
  o = os.getenv("P")