sanketmalde commited on
Commit
f6d39aa
·
verified ·
1 Parent(s): 9e594cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -9,10 +9,14 @@ def read_csv(csv_file):
9
  df = pd.read_csv(csv_file)
10
  json_output = convert_df_to_json(df, os.path.splitext(os.path.basename(csv_file))[0])
11
  prompt = generate_prompt(json_output)
 
 
12
  response = chat_model.invoke(prompt)
13
  json_content = response.content
14
  json_data = json.loads(json_content)
15
  pretty_json_string = json.dumps(json_data, indent=4)
 
 
16
  return pretty_json_string
17
 
18
  def generate_prompt(json_output):
 
9
  df = pd.read_csv(csv_file)
10
  json_output = convert_df_to_json(df, os.path.splitext(os.path.basename(csv_file))[0])
11
  prompt = generate_prompt(json_output)
12
+ print("Prompt: ")
13
+ print(prompt)
14
  response = chat_model.invoke(prompt)
15
  json_content = response.content
16
  json_data = json.loads(json_content)
17
  pretty_json_string = json.dumps(json_data, indent=4)
18
+ print("Response: ")
19
+ print(pretty_json_string)
20
  return pretty_json_string
21
 
22
  def generate_prompt(json_output):