Spaces:
Sleeping
Sleeping
File size: 730 Bytes
64af2ae 34b369f 4a10621 34b369f 4a10621 f64ef7b 4a10621 bd48583 4a10621 |
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 32 33 34 |
import gradio as gr
from src.TextSummarizer.pipeline.prediction import PredictionPipeline
def predict(document):
"""
Method will take the document and summarize it.
"""
# predict the summary using my own pre-trained model.
summary = PredictionPipeline().predict(document)
return summary
# Create the frontend.
input_interfaces: list = []
with gr.Blocks(theme=gr.themes.Soft()) as app:
with gr.Row():
gr.Label("Text Summarizer...")
with gr.Row():
gr.Markdown("Type in your document which you wanna summarize...")
with gr.Row():
with gr.Column():
gr.Label("gonna be the input box")
with gr.Column():
gr.Label("gonna be the output box")
app.launch() |