Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import json
|
|
6 |
|
7 |
def generate_answer_pix2struct_base(image_path, question):
|
8 |
try:
|
9 |
-
client = Client("https://
|
10 |
return client.predict(
|
11 |
image_path,
|
12 |
question,
|
@@ -36,7 +36,7 @@ def generate_answer(image_path, question, model_name, space_id):
|
|
36 |
|
37 |
|
38 |
def generate_answers(image_path, question):
|
39 |
-
answer_p2s_base = generate_answer_pix2struct_base(image_path, question
|
40 |
|
41 |
answer_p2s_large = generate_answer(image_path, question, model_name = "akdeniz27-pix2struct-DocVQA", space_id = "Pix2Struct Large")
|
42 |
|
|
|
6 |
|
7 |
def generate_answer_pix2struct_base(image_path, question):
|
8 |
try:
|
9 |
+
client = Client("https://qtoino-pix2struct.hf.space/")
|
10 |
return client.predict(
|
11 |
image_path,
|
12 |
question,
|
|
|
36 |
|
37 |
|
38 |
def generate_answers(image_path, question):
|
39 |
+
answer_p2s_base = generate_answer_pix2struct_base(image_path, question)
|
40 |
|
41 |
answer_p2s_large = generate_answer(image_path, question, model_name = "akdeniz27-pix2struct-DocVQA", space_id = "Pix2Struct Large")
|
42 |
|