Spaces:
Build error
Build error
Update caption.py
Browse files- caption.py +0 -3
caption.py
CHANGED
|
@@ -3,13 +3,10 @@ from transformers import AutoProcessor, AutoModelForCausalLM
|
|
| 3 |
import torch
|
| 4 |
from PIL import Image
|
| 5 |
|
| 6 |
-
from caption import predict_step
|
| 7 |
-
|
| 8 |
with gr.Blocks() as demo:
|
| 9 |
image = gr.Image(type='pil', label='Image')
|
| 10 |
label = gr.Text(label='Generated Caption')
|
| 11 |
image.upload(
|
| 12 |
-
predict_step,
|
| 13 |
[image],
|
| 14 |
[label]
|
| 15 |
)
|
|
|
|
| 3 |
import torch
|
| 4 |
from PIL import Image
|
| 5 |
|
|
|
|
|
|
|
| 6 |
with gr.Blocks() as demo:
|
| 7 |
image = gr.Image(type='pil', label='Image')
|
| 8 |
label = gr.Text(label='Generated Caption')
|
| 9 |
image.upload(
|
|
|
|
| 10 |
[image],
|
| 11 |
[label]
|
| 12 |
)
|