Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ from PIL import Image
|
|
| 6 |
from replicate import Client
|
| 7 |
|
| 8 |
|
| 9 |
-
illuse =
|
| 10 |
model_name = "andreasjansson/illusion:75d51a73fce3c00de31ed9ab4358c73e8fc0f627dc8ce975818e653317cb919b"
|
| 11 |
example_image = "https://replicate.delivery/pbxt/hHJNV9QteKX8DK2ckkUeXsqbEIKNGFXU1fN0MJoizz3iPlOjA/output-0.png"
|
| 12 |
|
|
@@ -36,8 +36,9 @@ def generate(prompt, negative_prompt, qr_content, pattern_image, num_inference_s
|
|
| 36 |
return result
|
| 37 |
except Exception as e:
|
| 38 |
print(e)
|
| 39 |
-
|
| 40 |
return
|
|
|
|
| 41 |
st.title("Illusion Diffusion Fast Demo powered by replicate")
|
| 42 |
|
| 43 |
prompt = st.text_input("Prompt")
|
|
|
|
| 6 |
from replicate import Client
|
| 7 |
|
| 8 |
|
| 9 |
+
illuse = Client(api_token=os.getenv('REPLICATE'))
|
| 10 |
model_name = "andreasjansson/illusion:75d51a73fce3c00de31ed9ab4358c73e8fc0f627dc8ce975818e653317cb919b"
|
| 11 |
example_image = "https://replicate.delivery/pbxt/hHJNV9QteKX8DK2ckkUeXsqbEIKNGFXU1fN0MJoizz3iPlOjA/output-0.png"
|
| 12 |
|
|
|
|
| 36 |
return result
|
| 37 |
except Exception as e:
|
| 38 |
print(e)
|
| 39 |
+
st.error(str(e))
|
| 40 |
return
|
| 41 |
+
|
| 42 |
st.title("Illusion Diffusion Fast Demo powered by replicate")
|
| 43 |
|
| 44 |
prompt = st.text_input("Prompt")
|