Spaces:
Runtime error
Runtime error
added image typr=numpy
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ def generate_image(text_prompt, init_image):
|
|
| 8 |
api_host = os.getenv('API_HOST', 'https://api.stability.ai')
|
| 9 |
url = f"{api_host}/v1alpha/generation/{engine_id}/image-to-image"
|
| 10 |
|
| 11 |
-
api_key = '
|
| 12 |
if api_key is None:
|
| 13 |
raise Exception("Missing Stability API key.")
|
| 14 |
|
|
@@ -52,6 +52,6 @@ inputs = [
|
|
| 52 |
gr.inputs.Image(label="Image")
|
| 53 |
]
|
| 54 |
|
| 55 |
-
outputs = gr.outputs.Image(label="Generated Image")
|
| 56 |
|
| 57 |
gr.Interface(fn=generate_image, inputs=inputs, outputs=outputs).launch(debug=True)
|
|
|
|
| 8 |
api_host = os.getenv('API_HOST', 'https://api.stability.ai')
|
| 9 |
url = f"{api_host}/v1alpha/generation/{engine_id}/image-to-image"
|
| 10 |
|
| 11 |
+
api_key = os.getenv('stability_ai')
|
| 12 |
if api_key is None:
|
| 13 |
raise Exception("Missing Stability API key.")
|
| 14 |
|
|
|
|
| 52 |
gr.inputs.Image(label="Image")
|
| 53 |
]
|
| 54 |
|
| 55 |
+
outputs = gr.outputs.Image(type='numpy', label="Generated Image")
|
| 56 |
|
| 57 |
gr.Interface(fn=generate_image, inputs=inputs, outputs=outputs).launch(debug=True)
|