Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -181,8 +181,8 @@ with gr.Blocks(title="Attendance System") as app:
|
|
| 181 |
|
| 182 |
with gr.Row():
|
| 183 |
with gr.Column(scale=2):
|
| 184 |
-
# Use
|
| 185 |
-
input_image = gr.Image(
|
| 186 |
process_button = gr.Button("Process Image")
|
| 187 |
output_image = gr.Image(label="Processed Feed")
|
| 188 |
status_text = gr.Textbox(label="Status", value="Capture an image and click 'Process Image'")
|
|
@@ -222,7 +222,7 @@ with gr.Blocks(title="Attendance System") as app:
|
|
| 222 |
|
| 223 |
# Create a requirements.txt file for Hugging Face
|
| 224 |
with open('requirements.txt', 'w') as f:
|
| 225 |
-
f.write('opencv-python-headless\npandas\ngradio\nultralytics')
|
| 226 |
|
| 227 |
# Launch the app
|
| 228 |
if __name__ == "__main__":
|
|
|
|
| 181 |
|
| 182 |
with gr.Row():
|
| 183 |
with gr.Column(scale=2):
|
| 184 |
+
# Fixed: Use sources instead of source for the webcam component
|
| 185 |
+
input_image = gr.Image(label="Webcam Feed", sources=["webcam"])
|
| 186 |
process_button = gr.Button("Process Image")
|
| 187 |
output_image = gr.Image(label="Processed Feed")
|
| 188 |
status_text = gr.Textbox(label="Status", value="Capture an image and click 'Process Image'")
|
|
|
|
| 222 |
|
| 223 |
# Create a requirements.txt file for Hugging Face
|
| 224 |
with open('requirements.txt', 'w') as f:
|
| 225 |
+
f.write('opencv-python-headless\npandas\ngradio>=3.32.0\nultralytics')
|
| 226 |
|
| 227 |
# Launch the app
|
| 228 |
if __name__ == "__main__":
|