Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,11 +3,13 @@ import pandas as pd
|
|
| 3 |
from transformers import pipeline
|
| 4 |
|
| 5 |
# Load the anomalies data and convert all cells to strings
|
| 6 |
-
|
| 7 |
-
df =
|
|
|
|
| 8 |
print(df.head())
|
| 9 |
|
| 10 |
def response(user_question):
|
|
|
|
| 11 |
if not isinstance(user_question, str):
|
| 12 |
raise TypeError(f"Esperado uma string para a pergunta, mas recebeu {type(user_question)}")
|
| 13 |
|
|
|
|
| 3 |
from transformers import pipeline
|
| 4 |
|
| 5 |
# Load the anomalies data and convert all cells to strings
|
| 6 |
+
data = pd.read_csv('anomalies.csv', sep=',', decimal='.')
|
| 7 |
+
df = pd.DataFrame(data)
|
| 8 |
+
df.fillna("", inplace=True)
|
| 9 |
print(df.head())
|
| 10 |
|
| 11 |
def response(user_question):
|
| 12 |
+
user_question = user_question.astype(str)
|
| 13 |
if not isinstance(user_question, str):
|
| 14 |
raise TypeError(f"Esperado uma string para a pergunta, mas recebeu {type(user_question)}")
|
| 15 |
|