Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,6 +37,8 @@ dataframes = {
|
|
37 |
#df["embedding"]=df["embedding"].apply(eval).apply(np.array)
|
38 |
def reply(input, dataframe_name):
|
39 |
try:
|
|
|
|
|
40 |
df = dataframes[dataframe_name]
|
41 |
input = input
|
42 |
input_vector = generate_embeddings(input, model_id,hf_token)
|
|
|
37 |
#df["embedding"]=df["embedding"].apply(eval).apply(np.array)
|
38 |
def reply(input, dataframe_name):
|
39 |
try:
|
40 |
+
if dataset_name not in dataframes:
|
41 |
+
return "Invalid dataset selected. Please select a valid dataset."
|
42 |
df = dataframes[dataframe_name]
|
43 |
input = input
|
44 |
input_vector = generate_embeddings(input, model_id,hf_token)
|