Spaces:
Sleeping
Sleeping
File size: 1,217 Bytes
3c383c4 5a17a45 5578e97 5a17a45 5578e97 5a17a45 5578e97 0d71b77 c4002d9 5578e97 5a17a45 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import streamlit as st
from PIL import Image
# Streamlit UI
# Left column: Text input and summary
st.title("Amharic Text Summarizer")
st.write("Paste your Amharic text below and click 'Summarize' to generate a concise summary.")
st.write("This app uses a trained FastText model to summarize your input text.")
col1, col2 = st.columns([6, 1]) # Wider column on the left
# Layout with two columns
# with col1:
# Text input area
input_text = st.text_area("Input Text", placeholder="Paste your Amharic text here...",height=200)
summarized_text=""
# Summarize button
if st.button("Summarize"):
if input_text.strip():
with st.spinner("Summarizing..."):
summarized_text = "summarize_text(input_text, model)"
st.success("Summarization complete!")
else:
summarized_text = "Please enter text to summarize."
# Output text area for summary
st.text_area("Summarized Text", value=summarized_text, height=200)
# Right column: Display the image
# with col2:
st.write("### Average Loss by Epoch")
# Load and display the image
image = Image.open("avgllose_epoch.png") # Replace with the actual path to your image
st.image(image, caption="Epoch vs Average Loss", use_container_width=True) |