VEDAGI1 commited on
Commit
c8c6f45
·
verified ·
1 Parent(s): 2454985

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -140,7 +140,7 @@ Now, provide your response in the following format:
140
  3. **Analysis Step A:** [e.g., "Calculate average wait times per hospital by grouping `dfs[0]` by 'Facility' and averaging 'Surgery_Median'."]
141
  4. **Analysis Step B:** [e.g., "Identify top 5 specialties by grouping `dfs[0]` by the 'Specialty' column and calculating the mean of 'Surgery_Median'."]
142
  5. **Analysis Step C:** [e.g., "Determine zone-level performance by grouping by 'Zone' and comparing to the overall provincial average."]
143
- 6. **JSON Output Structure:** [Describe the keys and values of the final JSON object]"""
144
 
145
  # Your complete Python script starts here
146
  import pandas as pd
@@ -150,7 +150,8 @@ import re
150
  # Main analysis logic...
151
  # ...
152
  # Final print statement
153
- print(json.dumps(final_data_structure, indent=4))
 
154
  generated_text = cohere_chat(prompt_for_coder)
155
  # This regex is more robust for extracting the final code block
156
  match = re2.search(r"PYTHON SCRIPT:\s*```python\n(.*?)```", generated_text, re2.DOTALL)
 
140
  3. **Analysis Step A:** [e.g., "Calculate average wait times per hospital by grouping `dfs[0]` by 'Facility' and averaging 'Surgery_Median'."]
141
  4. **Analysis Step B:** [e.g., "Identify top 5 specialties by grouping `dfs[0]` by the 'Specialty' column and calculating the mean of 'Surgery_Median'."]
142
  5. **Analysis Step C:** [e.g., "Determine zone-level performance by grouping by 'Zone' and comparing to the overall provincial average."]
143
+ 6. **JSON Output Structure:** [Describe the keys and values of the final JSON object]
144
 
145
  # Your complete Python script starts here
146
  import pandas as pd
 
150
  # Main analysis logic...
151
  # ...
152
  # Final print statement
153
+ print(json.dumps(final_data_structure, indent=4))"""
154
+
155
  generated_text = cohere_chat(prompt_for_coder)
156
  # This regex is more robust for extracting the final code block
157
  match = re2.search(r"PYTHON SCRIPT:\s*```python\n(.*?)```", generated_text, re2.DOTALL)