JefferyJapheth commited on
Commit
2abb6d3
1 Parent(s): 27ae852

added webcam_interface = gr.Interface( fn=predict_with_webcam, inputs=gr.inputs.Image(shape=(480, 640), source="webcam"), outputs=gr.outputs.Textbox(), # Use "Textbox" type instead of "Label" 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 +2 -1
app.py CHANGED
@@ -134,7 +134,7 @@ def predict_with_webcam(frame):
134
  webcam_interface = gr.Interface(
135
  fn=predict_with_webcam,
136
  inputs=gr.inputs.Image(shape=(480, 640), source="webcam"),
137
- outputs=gr.outputs.Label(), # Use "label" type instead of "textbox"
138
  live=True,
139
  interpretation="default",
140
  title="Webcam Landmark Prediction",
@@ -142,6 +142,7 @@ webcam_interface = gr.Interface(
142
  )
143
 
144
 
 
145
  # Launch the Gradio app with the webcam interface
146
  if __name__ == "__main__":
147
  webcam_interface.launch()
 
134
  webcam_interface = gr.Interface(
135
  fn=predict_with_webcam,
136
  inputs=gr.inputs.Image(shape=(480, 640), source="webcam"),
137
+ outputs=gr.outputs.Textbox(), # Use "Textbox" type instead of "Label"
138
  live=True,
139
  interpretation="default",
140
  title="Webcam Landmark Prediction",
 
142
  )
143
 
144
 
145
+
146
  # Launch the Gradio app with the webcam interface
147
  if __name__ == "__main__":
148
  webcam_interface.launch()