Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ 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(image_path, Textbox2, Textbox3):
|
28 |
if Textbox3 == code:
|
29 |
output = []
|
30 |
image_data = np.array(image_path)
|
@@ -97,6 +97,7 @@ def classify(image_path, Textbox2, Textbox3):
|
|
97 |
iface = gr.Interface(
|
98 |
fn=classify,
|
99 |
inputs = [
|
|
|
100 |
gr.inputs.Image(),
|
101 |
gr.inputs.Textbox(label="Textbox2",type="text"),
|
102 |
gr.inputs.Textbox(label="Textbox3",type="password")
|
|
|
24 |
with open("labels.txt", "r") as file:
|
25 |
labels = file.read().splitlines()
|
26 |
|
27 |
+
def classify(Textbox, image_path, Textbox2, Textbox3):
|
28 |
if Textbox3 == code:
|
29 |
output = []
|
30 |
image_data = np.array(image_path)
|
|
|
97 |
iface = gr.Interface(
|
98 |
fn=classify,
|
99 |
inputs = [
|
100 |
+
gr.inputs.Textbox(label="Textbox",type="text"),
|
101 |
gr.inputs.Image(),
|
102 |
gr.inputs.Textbox(label="Textbox2",type="text"),
|
103 |
gr.inputs.Textbox(label="Textbox3",type="password")
|