Rohanharsh163 commited on
Commit
29ff301
Β·
verified Β·
1 Parent(s): a3295e7

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +4 -12
src/streamlit_app.py CHANGED
@@ -1,10 +1,9 @@
1
  import streamlit as st
2
  from PIL import Image
3
  import requests
4
- from io import BytesIO
5
 
6
- st.set_page_config(page_title="WikiExplorer AR", layout="centered")
7
- st.title("πŸ“· WikiExplorer AR (Streamlit Edition)")
8
 
9
  # --- Multilingual language selector ---
10
  lang = st.selectbox(
@@ -24,13 +23,6 @@ lang_code = lang[1]
24
  st.markdown("**πŸ“ Enter a place or person name to learn more:**")
25
  place_name = st.text_input("πŸ›οΈ For example: Charminar, Taj Mahal, Shah Jahan")
26
 
27
- # --- Camera input (optional) ---
28
- img_file_buffer = st.camera_input("πŸ“Έ Take a picture (optional)")
29
-
30
- if img_file_buffer is not None:
31
- st.markdown("### πŸ“· Captured Image")
32
- st.image(img_file_buffer, caption="Uploaded via camera", use_column_width=True)
33
-
34
  # --- Translation helpers ---
35
  def translate_text(text, target_lang):
36
  try:
@@ -125,8 +117,8 @@ if place_name.strip():
125
  # --- Footer ---
126
  st.markdown("""
127
  ---
128
- - πŸ“Έ Capture photo optionally β€” main input is typed place name.
129
  - 🌐 Wikipedia multilingual summary with fallback + sentence-level translation.
130
  - πŸ–ΌοΈ Commons image gallery integration.
131
- - βœ… Works in Hugging Face Spaces with Streamlit.
132
  """)
 
1
  import streamlit as st
2
  from PIL import Image
3
  import requests
 
4
 
5
+ st.set_page_config(page_title="WikiExplorer", layout="centered")
6
+ st.title("πŸ“š WikiExplorer (Multilingual Edition)")
7
 
8
  # --- Multilingual language selector ---
9
  lang = st.selectbox(
 
23
  st.markdown("**πŸ“ Enter a place or person name to learn more:**")
24
  place_name = st.text_input("πŸ›οΈ For example: Charminar, Taj Mahal, Shah Jahan")
25
 
 
 
 
 
 
 
 
26
  # --- Translation helpers ---
27
  def translate_text(text, target_lang):
28
  try:
 
117
  # --- Footer ---
118
  st.markdown("""
119
  ---
120
+ - ✍️ Type a place or person’s name to learn about them instantly.
121
  - 🌐 Wikipedia multilingual summary with fallback + sentence-level translation.
122
  - πŸ–ΌοΈ Commons image gallery integration.
123
+ - βœ… Works seamlessly on Hugging Face Spaces with Streamlit.
124
  """)