import gradio as gr from summarizer import summarize_text def create_gradio_interface(): # Define the Gradio interface interface = gr.Interface(fn=summarize_text, inputs=gr.Textbox(label="Enter Text", placeholder="Paste the text you want to summarize here...", lines=10), outputs=gr.Textbox(label="Summary", placeholder="Here is the summary..."), title="Text Summarizer App", description="This app uses a machine learning model to summarize text while preserving its meaning and making it easy to understand.") return interface if __name__ == "__main__": # Run the app gradio_interface = create_gradio_interface() gradio_interface.launch()