JefferyJapheth commited on
Commit
03fbdcd
1 Parent(s): 8582f12

added # Modify the Gradio interface to use a "label" type output instead of "textbox" webcam_interface = gr.Interface( fn=predict_with_webcam, inputs=gr.inputs.Image(shape=(480, 640), source="webcam"), outputs=gr.outputs.Label(), # Use "label" type instead of "textbox" live=True, interpretation="default", title="Webcam Landmark Prediction", description="Make predictions using landmarks extracted from your webcam stream.", )

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -81,16 +81,18 @@ def predict_with_webcam(frame):
81
 
82
 
83
  # Define the Gradio interface with the Webcam input and Text output
 
84
  webcam_interface = gr.Interface(
85
  fn=predict_with_webcam,
86
  inputs=gr.inputs.Image(shape=(480, 640), source="webcam"),
87
- outputs="text",
88
  live=True,
89
  interpretation="default",
90
  title="Webcam Landmark Prediction",
91
  description="Make predictions using landmarks extracted from your webcam stream.",
92
  )
93
 
 
94
  # Launch the Gradio app with the webcam interface
95
  if __name__ == "__main__":
96
  webcam_interface.launch()
 
81
 
82
 
83
  # Define the Gradio interface with the Webcam input and Text output
84
+ # Modify the Gradio interface to use a "label" type output instead of "textbox"
85
  webcam_interface = gr.Interface(
86
  fn=predict_with_webcam,
87
  inputs=gr.inputs.Image(shape=(480, 640), source="webcam"),
88
+ outputs=gr.outputs.Label(), # Use "label" type instead of "textbox"
89
  live=True,
90
  interpretation="default",
91
  title="Webcam Landmark Prediction",
92
  description="Make predictions using landmarks extracted from your webcam stream.",
93
  )
94
 
95
+
96
  # Launch the Gradio app with the webcam interface
97
  if __name__ == "__main__":
98
  webcam_interface.launch()