benjaminStreltzin commited on
Commit
7d87e8c
·
verified ·
1 Parent(s): 7c583bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -6,6 +6,8 @@ from vit_Training import Custom_VIT_Model
6
  # Initialize the model
7
  model = CustomModel()
8
 
 
 
9
  # Variable to store the last prediction result
10
  last_prediction = None
11
 
@@ -23,7 +25,7 @@ def report_feedback():
23
  correct_label = 1 if predicted_label == 0 else 0 # Invert the label
24
  print(f"Reporting feedback: predicted_label={predicted_label}, correct_label={correct_label}") # Debugging line
25
  try:
26
- model.add_data(image, correct_label) # Pass the incorrect prediction to the model
27
  print("Feedback recorded successfully.") # Debugging line
28
  return "Feedback recorded. Thank you!"
29
  except Exception as e:
 
6
  # Initialize the model
7
  model = CustomModel()
8
 
9
+ model_training = Custom_VIT_Model()
10
+
11
  # Variable to store the last prediction result
12
  last_prediction = None
13
 
 
25
  correct_label = 1 if predicted_label == 0 else 0 # Invert the label
26
  print(f"Reporting feedback: predicted_label={predicted_label}, correct_label={correct_label}") # Debugging line
27
  try:
28
+ model_training.add_data(image, correct_label) # Pass the incorrect prediction to the model
29
  print("Feedback recorded successfully.") # Debugging line
30
  return "Feedback recorded. Thank you!"
31
  except Exception as e: