Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ if uploaded_file is not None and question:
|
|
| 20 |
try:
|
| 21 |
# Read table from CSV
|
| 22 |
table = pd.read_csv(uploaded_file)
|
| 23 |
-
|
| 24 |
|
| 25 |
# Display the table
|
| 26 |
st.write("Uploaded Table:")
|
|
@@ -28,7 +28,7 @@ if uploaded_file is not None and question:
|
|
| 28 |
|
| 29 |
# Convert DataFrame to the format expected by TAPAS
|
| 30 |
table_data = table.as_type(str)
|
| 31 |
-
|
| 32 |
|
| 33 |
# Get answer
|
| 34 |
answer = tqa(table=table_data, query=question)['cells'][0]
|
|
|
|
| 20 |
try:
|
| 21 |
# Read table from CSV
|
| 22 |
table = pd.read_csv(uploaded_file)
|
| 23 |
+
|
| 24 |
|
| 25 |
# Display the table
|
| 26 |
st.write("Uploaded Table:")
|
|
|
|
| 28 |
|
| 29 |
# Convert DataFrame to the format expected by TAPAS
|
| 30 |
table_data = table.as_type(str)
|
| 31 |
+
|
| 32 |
|
| 33 |
# Get answer
|
| 34 |
answer = tqa(table=table_data, query=question)['cells'][0]
|