vjain commited on
Commit
62a1daa
1 Parent(s): 81f8cdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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)