Spaces:
Runtime error
Runtime error
mynkchaudhry
commited on
Commit
•
5b7cddd
1
Parent(s):
df00160
upload all the files
Browse files
app.py
CHANGED
@@ -3,9 +3,9 @@ from transformers import AutoModelForCausalLM, AutoProcessor
|
|
3 |
from PIL import Image
|
4 |
import torch
|
5 |
|
6 |
-
# Load model and processor
|
7 |
model = AutoModelForCausalLM.from_pretrained("mynkchaudhry/Florence-2-FT-DocVQA", trust_remote_code=True)
|
8 |
-
processor = AutoProcessor.from_pretrained("mynkchaudhry/Florence-2-FT-DocVQA"
|
9 |
|
10 |
def generate_response(image, question):
|
11 |
try:
|
|
|
3 |
from PIL import Image
|
4 |
import torch
|
5 |
|
6 |
+
# Load model and processor
|
7 |
model = AutoModelForCausalLM.from_pretrained("mynkchaudhry/Florence-2-FT-DocVQA", trust_remote_code=True)
|
8 |
+
processor = AutoProcessor.from_pretrained("mynkchaudhry/Florence-2-FT-DocVQA")
|
9 |
|
10 |
def generate_response(image, question):
|
11 |
try:
|