Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,16 +7,14 @@ from pypdf import PdfReader
|
|
| 7 |
|
| 8 |
vision_pipe = pipeline(
|
| 9 |
"image-to-text",
|
| 10 |
-
model="
|
| 11 |
device=-1
|
| 12 |
)
|
| 13 |
|
| 14 |
text_pipe = pipeline(
|
| 15 |
"text2text-generation",
|
| 16 |
-
model="
|
| 17 |
max_length=256,
|
| 18 |
-
num_beams=4,
|
| 19 |
-
no_repeat_ngram_size=3,
|
| 20 |
device=-1
|
| 21 |
)
|
| 22 |
|
|
|
|
| 7 |
|
| 8 |
vision_pipe = pipeline(
|
| 9 |
"image-to-text",
|
| 10 |
+
model="nlpconnect/vit-gpt2-image-captioning",
|
| 11 |
device=-1
|
| 12 |
)
|
| 13 |
|
| 14 |
text_pipe = pipeline(
|
| 15 |
"text2text-generation",
|
| 16 |
+
model="t5-small",
|
| 17 |
max_length=256,
|
|
|
|
|
|
|
| 18 |
device=-1
|
| 19 |
)
|
| 20 |
|