Spaces:
Runtime error
Runtime error
import gradio as gr | |
from gradio.mix import Parallel | |
title = 'Comparing different dialogue summarization models' | |
description = 'Here we are going to compare different summarization model namely BART-LARGE model which is trained on samsum data and t5small model which is also trained on the same dataset.' | |
example = [[''' A: Hello B. How are you? | |
B: I'm good. How's your course going on these days? | |
A: It's going well. Pretty tiring but overall fun. | |
B: That's great to hear. If you are free wanna grab a cup of coffee? | |
A: Sure!!!! I recently discovered a new cafe near my home. | |
B: Awesome. Let's go.'''], | |
['''Rohit: Hi, how’re you? | |
Mahesh: I’m fine. What about you? | |
Rohit: Good. How’s your work going on? | |
Mahesh: Not great. | |
Rohit: Why? What happened? | |
Mahesh: My workplace is far from my home. Most of my time is spent commuting and I'm not able to give time to my family. | |
Rohit: Oh!! That sounds taxing. What are you planning to do now? | |
Mahesh: I will again start applying for jobs near my home. | |
Rohit: Best of luck man!!''']] | |
model1 = gr.Interface.load("huggingface/anegi/t5smallmodel", | |
title = 'BART-Large-cnn-samsum', | |
description = 'This is a pre trained model' | |
) | |
model2 = gr.Interface.load("huggingface/philschmid/bart-large-cnn-samsum", | |
title = 'T5-small model', | |
description = 'This is a self trained model', | |
) | |
model3 = gr.Interface.load("huggingface/lidiya/bart-large-xsum-samsum", | |
title = 'T5-small model', | |
description = 'This is a self trained model', | |
) | |
Parallel(model1, model2 ,model3, | |
title = title, | |
description = description, | |
inputs = gr.inputs.Textbox(lines = 7, label = 'Input Text', placeholder = 'Please enter your dialogue text here'), | |
layout='vertically', | |
examples = example, | |
theme = 'peach' ).launch() | |