Spaces:
Sleeping
Sleeping
Commit
·
4a41b58
1
Parent(s):
bcd3a2d
Back to PyTorch
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
3 |
|
4 |
-
from transformers import
|
5 |
|
6 |
-
processor =
|
7 |
-
model =
|
8 |
|
9 |
enable = st.checkbox("Enable camera")
|
10 |
picture = st.camera_input("Take a picture", disabled=not enable)
|
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
3 |
|
4 |
+
from transformers import BlipProcessor, BlipForConditionalGeneration
|
5 |
|
6 |
+
processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-large")
|
7 |
+
model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-large")
|
8 |
|
9 |
enable = st.checkbox("Enable camera")
|
10 |
picture = st.camera_input("Take a picture", disabled=not enable)
|