Spaces:
Build error
Build error
Download app.py from csvaldellon/summarizer_model_streamlit: direct link, hf CLI and curl.
- Browser
- Download file 527 Bytes
-
https://huggingface.co/spaces/csvaldellon/summarizer_model_streamlit/resolve/main/app.py
- Command line
-
hf download hf://spaces/csvaldellon/summarizer_model_streamlit/app.py
-
curl -L -o app.py https://huggingface.co/spaces/csvaldellon/summarizer_model_streamlit/resolve/main/app.py
527 Bytes
| import streamlit as st | |
| from summarizer import summarize_text | |
| def main(): | |
| st.title("Text Summarizer") | |
| text = st.text_area("Enter text to summarize") | |
| if st.button("Summarize"): | |
| if text: | |
| summarized_text = summarize_text(text) | |
| st.subheader("Original Text") | |
| st.write(text) | |
| st.subheader("Summarized Text") | |
| st.write(summarized_text) | |
| else: | |
| st.warning("Please enter some text to summarize") | |
| if __name__ == "__main__": | |
| main() | |