DIVY118 commited on
Commit
dc3b37b
·
verified ·
1 Parent(s): cf0e4ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
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 jsonify(result)
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'])