Phauglin commited on
Commit
d393584
·
verified ·
1 Parent(s): b89861e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -118,7 +118,8 @@ def process_image(img, generate_image=True):
118
  result = client.images.generate(
119
  model="gpt-image-1",
120
  prompt=random.choice(prompt_templates).format(flower=predicted_class),
121
- size="1024x1024"
 
122
  )
123
 
124
  image_base64 = result.data[0].b64_json
@@ -159,7 +160,7 @@ with gr.Blocks() as demo:
159
  with gr.Column():
160
  label_output = gr.Label(label="Classification Results")
161
  wiki_output = gr.Textbox(label="Wikipedia Article Link", lines=1)
162
- endangerment_output = gr.Textbox(label="Endangerment Status", lines=1) # ← NEW
163
  generated_image = gr.Image(label="AI Generated Interpretation")
164
 
165
  # Add example images using local paths
 
118
  result = client.images.generate(
119
  model="gpt-image-1",
120
  prompt=random.choice(prompt_templates).format(flower=predicted_class),
121
+ size="1024x1024",
122
+ quality="low"
123
  )
124
 
125
  image_base64 = result.data[0].b64_json
 
160
  with gr.Column():
161
  label_output = gr.Label(label="Classification Results")
162
  wiki_output = gr.Textbox(label="Wikipedia Article Link", lines=1)
163
+ endangerment_output = gr.Textbox(label="Endangerment Status", lines=1)
164
  generated_image = gr.Image(label="AI Generated Interpretation")
165
 
166
  # Add example images using local paths