dschandra commited on
Commit
790c6c7
·
verified ·
1 Parent(s): ca01181

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from summarizer import summarize_text
3
+
4
+ def create_gradio_interface():
5
+ # Define the Gradio interface
6
+ interface = gr.Interface(fn=summarize_text,
7
+ inputs=gr.Textbox(label="Enter Text", placeholder="Paste the text you want to summarize here...", lines=10),
8
+ outputs=gr.Textbox(label="Summary", placeholder="Here is the summary..."),
9
+ title="Text Summarizer App",
10
+ description="This app uses a machine learning model to summarize text while preserving its meaning and making it easy to understand.")
11
+ return interface
12
+
13
+ if __name__ == "__main__":
14
+ # Run the app
15
+ gradio_interface = create_gradio_interface()
16
+ gradio_interface.launch()