maialumiaho commited on
Commit
ec797ab
1 Parent(s): cc4f9e4

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -22
app.py DELETED
@@ -1,22 +0,0 @@
1
- import streamlit as st
2
-
3
- from PIL import Image
4
-
5
- #authorization
6
- API_URL = "https://api-inference.huggingface.co/models/xinsir/controlnet-union-sdxl-1.0"
7
-
8
- headers = {"Authorization": "spaces_prototype"}
9
-
10
-
11
- def query(payload):
12
- response = requests.post(API_URL, headers=headers, json=payload)
13
- return response.content
14
-
15
-
16
- #function to generate image based on the prompt
17
- def generate_image(prompt):
18
- image_bytes = query({"inputs": prompt})
19
- image = Image.open(io.BytesIO(image_bytes))
20
- return image
21
-
22
-