Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ def clean_sql_for_duckdb(sql, df_columns):
|
|
| 55 |
|
| 56 |
# 💬 Main chatbot function
|
| 57 |
def chatbot_interface(file, question):
|
| 58 |
-
|
| 59 |
df = pd.read_excel(file)
|
| 60 |
sql = generate_sql_from_prompt(question, df)
|
| 61 |
cleaned_sql = clean_sql_for_duckdb(sql, df.columns)
|
|
|
|
| 55 |
|
| 56 |
# 💬 Main chatbot function
|
| 57 |
def chatbot_interface(file, question):
|
| 58 |
+
try:
|
| 59 |
df = pd.read_excel(file)
|
| 60 |
sql = generate_sql_from_prompt(question, df)
|
| 61 |
cleaned_sql = clean_sql_for_duckdb(sql, df.columns)
|