Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ uploaded_photo = c2.file_uploader("Upload Image",type=['jpg','png','jpeg'], on_c
|
|
22 |
camera_photo = c2.camera_input("Take a photo", on_change=change_photo_state)
|
23 |
#st.subheader("Detection")
|
24 |
if st.checkbox("Generate_Caption"):
|
25 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "
|
26 |
model.to(device)
|
27 |
max_length = 16
|
28 |
num_beams = 4
|
|
|
22 |
camera_photo = c2.camera_input("Take a photo", on_change=change_photo_state)
|
23 |
#st.subheader("Detection")
|
24 |
if st.checkbox("Generate_Caption"):
|
25 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
26 |
model.to(device)
|
27 |
max_length = 16
|
28 |
num_beams = 4
|