Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -85,11 +85,8 @@ def IMGEN():
|
|
85 |
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2-1"
|
86 |
headers = {"Authorization": f"Bearer {key}"}
|
87 |
|
88 |
-
result = {
|
89 |
-
'response': requests.post(API_URL, headers=headers, json={"inputs": prompt,}).content.decode('utf-8', 'ignore')
|
90 |
-
}
|
91 |
|
92 |
-
return
|
93 |
|
94 |
|
95 |
@app.route('/divyanshpizza', methods=['GET'])
|
|
|
85 |
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2-1"
|
86 |
headers = {"Authorization": f"Bearer {key}"}
|
87 |
|
|
|
|
|
|
|
88 |
|
89 |
+
return requests.post(API_URL, headers=headers, json={"inputs": prompt,}).content
|
90 |
|
91 |
|
92 |
@app.route('/divyanshpizza', methods=['GET'])
|