Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,21 +6,18 @@ import time
|
|
| 6 |
|
| 7 |
@st.cache(allow_output_mutation=True)
|
| 8 |
def load_model():
|
| 9 |
-
|
| 10 |
-
Retrieves the trained model
|
| 11 |
-
"""
|
| 12 |
model = pipeline('image-to-text')
|
| 13 |
return model
|
| 14 |
|
| 15 |
def main():
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
instructions = """Click an image using inbuilt camera
|
| 19 |
-
or upload an image file"""
|
| 20 |
st.write(instructions)
|
| 21 |
|
| 22 |
img = None
|
| 23 |
-
pictureCam = st.camera_input(
|
| 24 |
pictureUpload = st.file_uploader('Upload An Image')
|
| 25 |
|
| 26 |
if pictureCam :
|
|
|
|
| 6 |
|
| 7 |
@st.cache(allow_output_mutation=True)
|
| 8 |
def load_model():
|
| 9 |
+
"""Retrieves the trained model"""
|
|
|
|
|
|
|
| 10 |
model = pipeline('image-to-text')
|
| 11 |
return model
|
| 12 |
|
| 13 |
def main():
|
| 14 |
+
caption = load_model()
|
| 15 |
+
st.title('Welcome to image to speech app')
|
| 16 |
+
instructions = """Click an image using inbuilt camera or upload an image file"""
|
|
|
|
| 17 |
st.write(instructions)
|
| 18 |
|
| 19 |
img = None
|
| 20 |
+
pictureCam = st.camera_input('Take a picture')
|
| 21 |
pictureUpload = st.file_uploader('Upload An Image')
|
| 22 |
|
| 23 |
if pictureCam :
|