tommy24 commited on
Commit
35371a8
·
1 Parent(s): 2ba20ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -24,10 +24,10 @@ data = np.ndarray(shape=(1, 224, 224, 3), dtype=np.float32)
24
  with open("labels.txt", "r") as file:
25
  labels = file.read().splitlines()
26
 
27
- def classify(Textbox, Image, Textbox2, Textbox3):
28
  if Textbox3 == code:
29
  output = []
30
- image_data = np.array(Image)
31
  image_data = cv.resize(image_data, (224, 224))
32
  image_array = np.asarray(image_data)
33
  normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1
@@ -96,7 +96,6 @@ def classify(Textbox, Image, Textbox2, Textbox3):
96
 
97
  user_inputs = [
98
  gr.inputs.Textbox(label="Textbox",type="text"),
99
- gr.inputs.Textbox(label="Image",type="text"),
100
  gr.inputs.Textbox(label="Textbox2",type="text"),
101
  gr.inputs.Textbox(label="Textbox3",type="password")
102
  ]
 
24
  with open("labels.txt", "r") as file:
25
  labels = file.read().splitlines()
26
 
27
+ def classify(Textbox, Textbox2, Textbox3):
28
  if Textbox3 == code:
29
  output = []
30
+ image_data = np.array("Image")
31
  image_data = cv.resize(image_data, (224, 224))
32
  image_array = np.asarray(image_data)
33
  normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1
 
96
 
97
  user_inputs = [
98
  gr.inputs.Textbox(label="Textbox",type="text"),
 
99
  gr.inputs.Textbox(label="Textbox2",type="text"),
100
  gr.inputs.Textbox(label="Textbox3",type="password")
101
  ]