adil9858 commited on
Commit
fedcdaf
·
verified ·
1 Parent(s): 3a7790d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -46,7 +46,8 @@ def get_api_response(base64_img):
46
 
47
  # Streamlit interface
48
  def main():
49
- st.title("Image to Text AI Application")
 
50
  st.write("Upload an image and get a response based on the image content.")
51
 
52
  # File uploader for image
@@ -57,7 +58,7 @@ def main():
57
  img = Image.open(uploaded_file)
58
 
59
  # Display the uploaded image
60
- st.image(img, caption="Uploaded Image", use_column_width=True)
61
 
62
  # Encode the image to base64
63
  base64_img = encode_image(img)
@@ -67,7 +68,7 @@ def main():
67
  response = get_api_response(base64_img)
68
 
69
  # Display the result
70
- st.write("API Response: ", response)
71
 
72
  # Run the Streamlit app
73
  if __name__ == "__main__":
 
46
 
47
  # Streamlit interface
48
  def main():
49
+ st.title("Image Dex: AI Image Explainer")
50
+
51
  st.write("Upload an image and get a response based on the image content.")
52
 
53
  # File uploader for image
 
58
  img = Image.open(uploaded_file)
59
 
60
  # Display the uploaded image
61
+ st.image(img, caption="Uploaded Image",width=400)
62
 
63
  # Encode the image to base64
64
  base64_img = encode_image(img)
 
68
  response = get_api_response(base64_img)
69
 
70
  # Display the result
71
+ st.write("Result:-> ", response)
72
 
73
  # Run the Streamlit app
74
  if __name__ == "__main__":