Spaces:
Runtime error
Runtime error
Fangyu Liu
commited on
Commit
·
fdac8dd
1
Parent(s):
800ade2
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
from transformers import Pix2StructForConditionalGeneration, Pix2StructProcessor
|
4 |
import os
|
5 |
|
@@ -47,7 +47,7 @@ A: Let's find the row of year 2007, that's Row 3. Let's extract the numbers on R
|
|
47 |
{_INSTRUCTION}"""
|
48 |
|
49 |
def text_generate(prompt, table, problem):
|
50 |
-
p = prompt
|
51 |
# print(f"Final prompt is : {p}")
|
52 |
json_ = {"inputs": p,
|
53 |
"parameters":
|
|
|
1 |
import gradio as gr
|
2 |
+
import requests
|
3 |
from transformers import Pix2StructForConditionalGeneration, Pix2StructProcessor
|
4 |
import os
|
5 |
|
|
|
47 |
{_INSTRUCTION}"""
|
48 |
|
49 |
def text_generate(prompt, table, problem):
|
50 |
+
p = prompt + "\n" + table + "\n" + "Q: " + problem
|
51 |
# print(f"Final prompt is : {p}")
|
52 |
json_ = {"inputs": p,
|
53 |
"parameters":
|