Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def blackjack_ai(image):
|
|
26 |
global model, processor
|
27 |
|
28 |
if model == None:
|
29 |
-
model = PaliGemmaForConditionalGeneration.from_pretrained(
|
30 |
processor = AutoProcessor.from_pretrained(model_id)
|
31 |
|
32 |
prompt = "<image><bos>extract json\n"
|
@@ -36,8 +36,7 @@ def blackjack_ai(image):
|
|
36 |
return processor.decode(output[0], skip_special_tokens=True)[14:]
|
37 |
|
38 |
with gr.Blocks() as demo:
|
39 |
-
|
40 |
-
|
41 |
image = gr.Image()
|
42 |
submit = gr.Button("Submit")
|
43 |
output = gr.TextArea()
|
|
|
26 |
global model, processor
|
27 |
|
28 |
if model == None:
|
29 |
+
model = PaliGemmaForConditionalGeneration.from_pretrained(finetuned_model_id)
|
30 |
processor = AutoProcessor.from_pretrained(model_id)
|
31 |
|
32 |
prompt = "<image><bos>extract json\n"
|
|
|
36 |
return processor.decode(output[0], skip_special_tokens=True)[14:]
|
37 |
|
38 |
with gr.Blocks() as demo:
|
39 |
+
|
|
|
40 |
image = gr.Image()
|
41 |
submit = gr.Button("Submit")
|
42 |
output = gr.TextArea()
|