Ely-testa commited on
Commit
8f162c5
·
verified ·
1 Parent(s): 3c3ceb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,7 +5,7 @@ from fastai.vision.all import *
5
  from pathlib import Path
6
  from PIL import Image
7
  import io
8
- from fal-client import fal
9
 
10
  # Dictionary of plant names and their Wikipedia links
11
  search_terms_wikipedia = {
@@ -121,7 +121,7 @@ def process_image(img, generate_image=True):
121
  prompt = random.choice(prompt_templates).format(flower=predicted_class)
122
 
123
  # Use fal-client to generate image
124
- result = fal.subscribe(
125
  "fal-ai/flux/dev",
126
  input={"prompt": prompt},
127
  on_queue_update=on_queue_update
@@ -191,4 +191,4 @@ with gr.Blocks() as demo:
191
  )
192
 
193
  # Start the application
194
- demo.launch(inline=False)
 
5
  from pathlib import Path
6
  from PIL import Image
7
  import io
8
+ from fal import client as fal_client
9
 
10
  # Dictionary of plant names and their Wikipedia links
11
  search_terms_wikipedia = {
 
121
  prompt = random.choice(prompt_templates).format(flower=predicted_class)
122
 
123
  # Use fal-client to generate image
124
+ result = fal_client.subscribe(
125
  "fal-ai/flux/dev",
126
  input={"prompt": prompt},
127
  on_queue_update=on_queue_update
 
191
  )
192
 
193
  # Start the application
194
+ demo.launch(inline=False)