rosemariafontana commited on
Commit
bda46a2
·
verified ·
1 Parent(s): ef3a845

Update process_data.py

Browse files
Files changed (1) hide show
  1. process_data.py +7 -5
process_data.py CHANGED
@@ -196,8 +196,8 @@ def generate_json_pieces(input_data, parameters):
196
 
197
 
198
  print("FIELD JSON: ")
199
- print(field_generated_json) # debugging
200
  field_pretty_json = field_generated_json.json()
 
201
 
202
 
203
  plant_response = client.beta.chat.completions.parse(
@@ -213,8 +213,8 @@ def generate_json_pieces(input_data, parameters):
213
 
214
 
215
  print("PLANT JSON: ")
216
- print(plant_generated_json) # debugging
217
  plant_pretty_json = plant_generated_json.json()
 
218
 
219
  log_response = client.beta.chat.completions.parse(
220
  model=model_version, # Use GPT model that supports structured output
@@ -229,8 +229,8 @@ def generate_json_pieces(input_data, parameters):
229
 
230
 
231
  print("LOG JSON: ")
232
- print(log_generated_json) # debugging
233
  log_pretty_json = log_generated_json.json()
 
234
 
235
  soil_response = client.beta.chat.completions.parse(
236
  model=model_version, # Use GPT model that supports structured output
@@ -245,8 +245,8 @@ def generate_json_pieces(input_data, parameters):
245
 
246
 
247
  print("SOIL JSON: ")
248
- print(soil_generated_json) # debugging
249
  soil_pretty_json = soil_generated_json.json()
 
250
 
251
  yield_response = client.beta.chat.completions.parse(
252
  model=model_version, # Use GPT model that supports structured output
@@ -261,8 +261,8 @@ def generate_json_pieces(input_data, parameters):
261
 
262
 
263
  print("YIELD JSON: ")
264
- print(yield_generated_json) # debugging
265
  yield_pretty_json = yield_generated_json.json()
 
266
 
267
  plantings = {
268
  **plant_pretty_json,
@@ -276,7 +276,9 @@ def generate_json_pieces(input_data, parameters):
276
  "plantings": plantings
277
  }
278
 
 
279
  final_pretty_json = farm_activities.json()
 
280
 
281
  return final_pretty_json, final_pretty_json, final_pretty_json
282
  except Exception as e:
 
196
 
197
 
198
  print("FIELD JSON: ")
 
199
  field_pretty_json = field_generated_json.json()
200
+ print(field_pretty_json) # debugging
201
 
202
 
203
  plant_response = client.beta.chat.completions.parse(
 
213
 
214
 
215
  print("PLANT JSON: ")
 
216
  plant_pretty_json = plant_generated_json.json()
217
+ print(plant_pretty_json) # debugging
218
 
219
  log_response = client.beta.chat.completions.parse(
220
  model=model_version, # Use GPT model that supports structured output
 
229
 
230
 
231
  print("LOG JSON: ")
 
232
  log_pretty_json = log_generated_json.json()
233
+ print(log_pretty_json) # debugging
234
 
235
  soil_response = client.beta.chat.completions.parse(
236
  model=model_version, # Use GPT model that supports structured output
 
245
 
246
 
247
  print("SOIL JSON: ")
 
248
  soil_pretty_json = soil_generated_json.json()
249
+ print(soil_pretty_json) # debugging
250
 
251
  yield_response = client.beta.chat.completions.parse(
252
  model=model_version, # Use GPT model that supports structured output
 
261
 
262
 
263
  print("YIELD JSON: ")
 
264
  yield_pretty_json = yield_generated_json.json()
265
+ print(yield_pretty_json) # debugging
266
 
267
  plantings = {
268
  **plant_pretty_json,
 
276
  "plantings": plantings
277
  }
278
 
279
+ print("FINAL JSON: ")
280
  final_pretty_json = farm_activities.json()
281
+ print(final_pretty_json)
282
 
283
  return final_pretty_json, final_pretty_json, final_pretty_json
284
  except Exception as e: