Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,7 +99,7 @@ def process(image: Image):
|
|
| 99 |
return "Please upload an image", "", "", "", get_recommendations()
|
| 100 |
|
| 101 |
# 1) BLIP caption
|
| 102 |
-
caption_result = caption_pipe(image, max_new_tokens=64
|
| 103 |
caption = caption_result[0]['generated_text'].strip()
|
| 104 |
|
| 105 |
# 1a) Expand caption if too short
|
|
@@ -172,7 +172,7 @@ def main():
|
|
| 172 |
sug_out = gr.Textbox(label='Improvement Suggestions', lines=5, interactive=False)
|
| 173 |
btn = gr.Button('Analyze Ad', size='sm', variant='primary')
|
| 174 |
|
| 175 |
-
gallery = gr.Gallery(label='Example Ads'
|
| 176 |
|
| 177 |
btn.click(
|
| 178 |
fn=process,
|
|
|
|
| 99 |
return "Please upload an image", "", "", "", get_recommendations()
|
| 100 |
|
| 101 |
# 1) BLIP caption
|
| 102 |
+
caption_result = caption_pipe(image, max_new_tokens=64)
|
| 103 |
caption = caption_result[0]['generated_text'].strip()
|
| 104 |
|
| 105 |
# 1a) Expand caption if too short
|
|
|
|
| 172 |
sug_out = gr.Textbox(label='Improvement Suggestions', lines=5, interactive=False)
|
| 173 |
btn = gr.Button('Analyze Ad', size='sm', variant='primary')
|
| 174 |
|
| 175 |
+
gallery = gr.Gallery(label='Example Ads') # Empty initially
|
| 176 |
|
| 177 |
btn.click(
|
| 178 |
fn=process,
|