Spaces:
Sleeping
Sleeping
app.py
CHANGED
@@ -12,13 +12,13 @@ HEADERS = {"Authorization": f"Bearer ${os.getenv('bearer_token')}"}
|
|
12 |
|
13 |
st.title("Image Generator with Diffusers")
|
14 |
|
15 |
-
def
|
16 |
response = requests.post(API_URL, headers=HEADERS, json=payload)
|
17 |
return response.content
|
18 |
|
19 |
prompt = st.text_input("Enter a prompt:", "batman hitting the griddy in gotham")
|
20 |
|
21 |
-
image_bytes =
|
22 |
"inputs": prompt,
|
23 |
})
|
24 |
|
|
|
12 |
|
13 |
st.title("Image Generator with Diffusers")
|
14 |
|
15 |
+
def query(payload):
|
16 |
response = requests.post(API_URL, headers=HEADERS, json=payload)
|
17 |
return response.content
|
18 |
|
19 |
prompt = st.text_input("Enter a prompt:", "batman hitting the griddy in gotham")
|
20 |
|
21 |
+
image_bytes = query({
|
22 |
"inputs": prompt,
|
23 |
})
|
24 |
|