vjain commited on
Commit
aadb451
1 Parent(s): a9baa59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -36,6 +36,7 @@ dataframes = {
36
  #df = pd.read_csv("TA_embeddings.csv")
37
  #df["embedding"]=df["embedding"].apply(eval).apply(np.array)
38
  def reply(input, dataset_name):
 
39
  try:
40
  if dataset_name not in dataframes:
41
  return "Invalid dataset selected. Please select a valid dataset."
@@ -72,7 +73,12 @@ def reply(input, dataset_name):
72
  return response
73
  except Exception as e:
74
  return f"An error occurred: {e}"
 
 
 
 
75
 
 
76
 
77
 
78
 
 
36
  #df = pd.read_csv("TA_embeddings.csv")
37
  #df["embedding"]=df["embedding"].apply(eval).apply(np.array)
38
  def reply(input, dataset_name):
39
+ global messages
40
  try:
41
  if dataset_name not in dataframes:
42
  return "Invalid dataset selected. Please select a valid dataset."
 
73
  return response
74
  except Exception as e:
75
  return f"An error occurred: {e}"
76
+
77
+ chat_transcript = ""
78
+ for message in response:
79
+ chat_transcript += response + "\n\n" message['content'] + "\n\n"
80
 
81
+ return chat_transcript
82
 
83
 
84