Spaces:
Sleeping
Sleeping
Alexandre Gazola
commited on
Commit
·
aa1410a
1
Parent(s):
1b0b6ed
roda so chess e excel
Browse files- app.py +4 -0
- excel_parser_tool.py +1 -1
app.py
CHANGED
@@ -74,6 +74,10 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
74 |
if not task_id or question_text is None:
|
75 |
print(f"Skipping item with missing task_id or question: {item}")
|
76 |
continue
|
|
|
|
|
|
|
|
|
77 |
try:
|
78 |
file_name = item.get("file_name")
|
79 |
|
|
|
74 |
if not task_id or question_text is None:
|
75 |
print(f"Skipping item with missing task_id or question: {item}")
|
76 |
continue
|
77 |
+
|
78 |
+
if "chess" not in question_text and "excel" not in question_text:
|
79 |
+
continue
|
80 |
+
|
81 |
try:
|
82 |
file_name = item.get("file_name")
|
83 |
|
excel_parser_tool.py
CHANGED
@@ -9,7 +9,7 @@ from utils import get_base64, get_text_file_contents
|
|
9 |
def parse_excel(base64_filepath: str) -> str:
|
10 |
"""Parses a base64-encoded Excel (.xlsx) file and returns a markdown summary."""
|
11 |
try:
|
12 |
-
base64_str = get_text_file_contents(
|
13 |
|
14 |
file_bytes = base64.b64decode(base64_str)
|
15 |
excel_file = pd.ExcelFile(io.BytesIO(file_bytes))
|
|
|
9 |
def parse_excel(base64_filepath: str) -> str:
|
10 |
"""Parses a base64-encoded Excel (.xlsx) file and returns a markdown summary."""
|
11 |
try:
|
12 |
+
base64_str = get_text_file_contents(base64_filepath)
|
13 |
|
14 |
file_bytes = base64.b64decode(base64_str)
|
15 |
excel_file = pd.ExcelFile(io.BytesIO(file_bytes))
|