WarTitan2077 commited on
Commit
ff911a9
·
verified ·
1 Parent(s): b28d8c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -20,12 +20,14 @@ def classify_numbers(input1, input2, input3):
20
  "Input2": input2,
21
  "Input3": input3
22
  }
23
-
 
 
24
  results = {}
25
 
26
  for name, value in inputs.items():
27
  if value.strip(): # only process non-empty input
28
- output = classifier(value)[0] # list of dicts for each label
29
  result = {
30
  label_map[item["label"]]: round(item["score"], 3)
31
  for item in output
@@ -33,9 +35,12 @@ def classify_numbers(input1, input2, input3):
33
  results[name] = result
34
  else:
35
  results[name] = {}
36
-
 
 
37
  return results
38
 
 
39
  # Define Gradio interface
40
  inputs = [
41
  gr.Textbox(label="Input 1"),
 
20
  "Input2": input2,
21
  "Input3": input3
22
  }
23
+
24
+ print(f"Received inputs: {inputs}") # Log inputs
25
+
26
  results = {}
27
 
28
  for name, value in inputs.items():
29
  if value.strip(): # only process non-empty input
30
+ output = classifier(value)[0]
31
  result = {
32
  label_map[item["label"]]: round(item["score"], 3)
33
  for item in output
 
35
  results[name] = result
36
  else:
37
  results[name] = {}
38
+
39
+ print(f"Returning results: {results}") # Log outputs
40
+
41
  return results
42
 
43
+
44
  # Define Gradio interface
45
  inputs = [
46
  gr.Textbox(label="Input 1"),