kamalcst commited on
Commit
b2394ab
·
verified ·
1 Parent(s): 02d2eea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -15,14 +15,10 @@ def predict(image):
15
  with torch.no_grad():
16
  outputs = model(**inputs)
17
 
18
- # Get the model's original outputs (e.g., logits or probabilities)
19
  predictions = outputs.logits
20
-
21
- # Convert predictions to a list and round to 2 decimal places if necessary
22
- predictions_list = predictions.tolist()
23
- rounded_predictions = [[round(pred, 2) for pred in prediction] for prediction in predictions_list]
24
 
25
- return rounded_predictions
26
 
27
  # Create Gradio interface
28
  iface = gr.Interface(
 
15
  with torch.no_grad():
16
  outputs = model(**inputs)
17
 
18
+ # Return the model's original outputs (e.g., logits or probabilities)
19
  predictions = outputs.logits
 
 
 
 
20
 
21
+ return predictions
22
 
23
  # Create Gradio interface
24
  iface = gr.Interface(