import gradio as gr from gradio.mix import Parallel description = 'Dialogue summarization models' title = 'Comparing different dialogue summarization models' 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: I can’t cope with my manager. He was fine, to begin with, but not anymore. But that’s not the only reason. Rohit: Then? Mahesh: Also, the commute time to the office is just too much at the moment, and I don’t foresee a shift to a closer location in this organization. Too much time on the road is taking a toll on me. Rohit: Got it. So have you been applying elsewhere? Mahesh: I am, but the route of sending resumes and cover letters have so far not yielded much. It seems as if they’re disappearing into a black hole, with little to no response coming. Do you know persons in the industry who can help me land interviews? Rohit: Sending resumes cold doesn’t work well. Offhand, I don’t recall a contact in your industry, but lemme try through people I know. I’ll let you know. Mahesh: Thanks.''']] model1 = gr.Interface.load("huggingface/philschmid/bart-large-cnn-samsum", title = 'BART-Large-cnn-samsum', description = 'This is a pre trained model' ) model2 = gr.Interface.load("huggingface/anegi/t5smallmodel", title = 'T5-small model', description = 'This is a self trained model', ) Parallel(model1, model2 , title = title, description = description, inputs = gr.inputs.Textbox(lines = 7, label = 'Input Text', placeholder = 'Please enter your dialogue text here'), examples = example, theme = 'dark-peach' ).launch()