CR7CAD commited on
Commit
a084b90
·
verified ·
1 Parent(s): b9c5fcd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ import os
6
  # function part
7
  # img2text
8
  def img2text(image_path):
9
- image_to_text = pipeline("image-to-text", model="Maciel/Muge-Image-Caption")
10
  text = image_to_text(image_path)[0]["generated_text"]
11
  return text
12
 
@@ -74,7 +74,7 @@ uploaded_file = st.file_uploader("Select an Image...")
74
 
75
  if uploaded_file is not None:
76
  # Display the uploaded image
77
- st.image(uploaded_file, caption="Uploaded Image", use_column_width=True)
78
 
79
  # Save the image temporarily
80
  image_path = save_uploaded_image(uploaded_file)
 
6
  # function part
7
  # img2text
8
  def img2text(image_path):
9
+ image_to_text = pipeline("image-to-text", model="dumperize/movie-picture-captioning")
10
  text = image_to_text(image_path)[0]["generated_text"]
11
  return text
12
 
 
74
 
75
  if uploaded_file is not None:
76
  # Display the uploaded image
77
+ st.image(uploaded_file, caption="Uploaded Image", use_container_width=True)
78
 
79
  # Save the image temporarily
80
  image_path = save_uploaded_image(uploaded_file)