anilkumar5590 commited on
Commit
93221db
·
verified ·
1 Parent(s): f30ed89

Update backendapi.py

Browse files
Files changed (1) hide show
  1. backendapi.py +1 -2
backendapi.py CHANGED
@@ -162,8 +162,8 @@ def predict():
162
  # Generate explanation using Gemini AI
163
  explanation = generate_explanation(predicted_class)
164
  prediction_results = {}
 
165
  if confidence_level<=30:
166
- prediction_id = str(time.time()) # Unique ID for the request
167
  prediction_results[prediction_id] = {
168
  "predicted_class": "---",
169
  "conservation_status": "---",
@@ -172,7 +172,6 @@ def predict():
172
  }
173
  else:
174
  # Store the result in the in-memory dictionary
175
- prediction_id = str(time.time()) # Unique ID for the request
176
  prediction_results[prediction_id] = {
177
  "predicted_class": predicted_class,
178
  "conservation_status": conservation_status,
 
162
  # Generate explanation using Gemini AI
163
  explanation = generate_explanation(predicted_class)
164
  prediction_results = {}
165
+ prediction_id = str(time.time()) # Unique ID for the request
166
  if confidence_level<=30:
 
167
  prediction_results[prediction_id] = {
168
  "predicted_class": "---",
169
  "conservation_status": "---",
 
172
  }
173
  else:
174
  # Store the result in the in-memory dictionary
 
175
  prediction_results[prediction_id] = {
176
  "predicted_class": predicted_class,
177
  "conservation_status": conservation_status,