Spaces:
Sleeping
Sleeping
app
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import open_clip
|
|
3 |
|
4 |
|
5 |
model, _, transform = open_clip.create_model_and_transforms(
|
6 |
-
"coca_ViT-
|
7 |
pretrained="laion2B-s13B-b90k-mscoco-2014.pt"
|
8 |
)
|
9 |
|
@@ -12,5 +12,5 @@ def output_generate(image):
|
|
12 |
generated = model.generate(im)
|
13 |
return open_clip.decode(generated).split("<end_of_text>")[0].replace("<start_of_text>", "")
|
14 |
|
15 |
-
iface = gr.Interface(fn=output_generate, inputs=gr.
|
16 |
iface.launch()
|
|
|
3 |
|
4 |
|
5 |
model, _, transform = open_clip.create_model_and_transforms(
|
6 |
+
"coca_ViT-L-14",
|
7 |
pretrained="laion2B-s13B-b90k-mscoco-2014.pt"
|
8 |
)
|
9 |
|
|
|
12 |
generated = model.generate(im)
|
13 |
return open_clip.decode(generated).split("<end_of_text>")[0].replace("<start_of_text>", "")
|
14 |
|
15 |
+
iface = gr.Interface(fn=output_generate, inputs=gr.Image(type="pil"), outputs="text")
|
16 |
iface.launch()
|