BrayanGuerreroXD commited on
Commit
12016cd
·
1 Parent(s): 4903d2e

mejoras adicionales a app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -34,4 +34,21 @@ if uploaded_file is not None:
34
  st.write("")
35
  st.write("Classifying...")
36
  label = clasificar(uploaded_file) ##aqui va el llamado a la IA
37
- st.write(label)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  st.write("")
35
  st.write("Classifying...")
36
  label = clasificar(uploaded_file) ##aqui va el llamado a la IA
37
+ st.write(label)
38
+
39
+ image = gr.inputs.Image(shape=(300, 300), label="Upload Your Image Here")
40
+ label = gr.outputs.Label(num_top_classes=len(labels))
41
+ samples = [["samples/" + p + ".jpg"] for p in labels]
42
+
43
+ interface = gr.Interface(
44
+ fn=predict_image,
45
+ inputs=[image, radio],
46
+ outputs=label,
47
+ capture_session=True,
48
+ allow_flagging=False,
49
+ title="🦈 Shark image classifier",
50
+ description="Made with HugsVision & ❤️",
51
+ examples=samples,
52
+ theme=None
53
+ )
54
+ interface.launch()