Update app.py
Browse files
app.py
CHANGED
|
@@ -122,11 +122,9 @@ def process_image(img, generate_image=True):
|
|
| 122 |
if generate_image:
|
| 123 |
prompt = random.choice(prompt_templates).format(flower=predicted_class)
|
| 124 |
|
| 125 |
-
# Initialize FAL Client
|
| 126 |
-
fal = fal_client(key=os.environ.get("FAL_KEY"))
|
| 127 |
|
| 128 |
# Use fal-client to generate image
|
| 129 |
-
result =
|
| 130 |
model_url="fal-ai/flux/dev",
|
| 131 |
prompt=prompt,
|
| 132 |
on_update=on_queue_update
|
|
|
|
| 122 |
if generate_image:
|
| 123 |
prompt = random.choice(prompt_templates).format(flower=predicted_class)
|
| 124 |
|
|
|
|
|
|
|
| 125 |
|
| 126 |
# Use fal-client to generate image
|
| 127 |
+
result = fal_client.subscribe(
|
| 128 |
model_url="fal-ai/flux/dev",
|
| 129 |
prompt=prompt,
|
| 130 |
on_update=on_queue_update
|