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

Update backendapi.py

Browse files
Files changed (1) hide show
  1. backendapi.py +4 -1
backendapi.py CHANGED
@@ -120,6 +120,9 @@ model = load_model_from_huggingface()
120
  def home():
121
  return "Welcome to the Wild Life Image Classification Project!"
122
 
 
 
 
123
  # Define route for predictions (POST)
124
  @app.route("/predict", methods=["POST"])
125
  def predict():
@@ -161,7 +164,7 @@ def predict():
161
 
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] = {
 
120
  def home():
121
  return "Welcome to the Wild Life Image Classification Project!"
122
 
123
+
124
+ prediction_results = {}
125
+
126
  # Define route for predictions (POST)
127
  @app.route("/predict", methods=["POST"])
128
  def predict():
 
164
 
165
  # Generate explanation using Gemini AI
166
  explanation = generate_explanation(predicted_class)
167
+
168
  prediction_id = str(time.time()) # Unique ID for the request
169
  if confidence_level<=30:
170
  prediction_results[prediction_id] = {