Spaces:
Runtime error
Runtime error
TenPoisk
commited on
Commit
·
8af3d8a
1
Parent(s):
315d1fe
Update kemal.py
Browse files
kemal.py
CHANGED
|
@@ -1,15 +1,3 @@
|
|
| 1 |
-
import
|
| 2 |
|
| 3 |
-
|
| 4 |
-
headers = {"Authorization": "Bearer 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"}
|
| 5 |
-
|
| 6 |
-
def query(payload):
|
| 7 |
-
response = requests.post(API_URL, headers=headers, json=payload)
|
| 8 |
-
return response.content
|
| 9 |
-
image_bytes = query({
|
| 10 |
-
"inputs": "Astronaut riding a horse",
|
| 11 |
-
})
|
| 12 |
-
# You can access the image with PIL.Image for example
|
| 13 |
-
import io
|
| 14 |
-
from PIL import Image
|
| 15 |
-
image = Image.open(io.BytesIO(image_bytes))
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
|
| 3 |
+
gr.Interface.load("models/johnslegers/epic-diffusion").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|