Ely-testa commited on
Commit
dd6a932
·
verified ·
1 Parent(s): dad5ed6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -7,12 +7,7 @@ from PIL import Image
7
  import io
8
  import os
9
 
10
- # Importing fal-client
11
- try:
12
- from fal.client import Client as FalClient
13
- except ImportError:
14
- print("Error: fal-client module not found. Make sure it's in requirements.txt")
15
- # Continue with a fallback if needed
16
 
17
  # Dictionary of plant names and their Wikipedia links
18
  search_terms_wikipedia = {
@@ -128,7 +123,7 @@ def process_image(img, generate_image=True):
128
  prompt = random.choice(prompt_templates).format(flower=predicted_class)
129
 
130
  # Initialize FAL Client
131
- fal = FalClient(key=os.environ.get("FAL_KEY"))
132
 
133
  # Use fal-client to generate image
134
  result = fal.subscribe(
 
7
  import io
8
  import os
9
 
10
+ import fal_client
 
 
 
 
 
11
 
12
  # Dictionary of plant names and their Wikipedia links
13
  search_terms_wikipedia = {
 
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 = fal.subscribe(