Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -67,9 +67,9 @@ else:
|
|
67 |
with st.spinner():
|
68 |
if st.button('Generate Graph'):
|
69 |
try:
|
70 |
-
# Ensure the question is a string
|
71 |
-
if not isinstance(question, str):
|
72 |
-
st.error("
|
73 |
else:
|
74 |
# Use TAPAS model to process the question
|
75 |
result = tqa(table=df, query=question)
|
|
|
67 |
with st.spinner():
|
68 |
if st.button('Generate Graph'):
|
69 |
try:
|
70 |
+
# Ensure the question is a valid string
|
71 |
+
if not isinstance(question, str) or not question.strip():
|
72 |
+
st.error("Please enter a valid question in the form of text.")
|
73 |
else:
|
74 |
# Use TAPAS model to process the question
|
75 |
result = tqa(table=df, query=question)
|