import gradio as gr | |
from transformers import pipeline | |
summarizer = pipeline('summarization', model='Eitanli/resume_label_summary_model') | |
def predict(text): | |
summary = summarizer(text, max_length=10, min_length=2) | |
return {'summary': summary} | |
iface = gr.Interface( | |
fn=predict, | |
inputs='text', | |
outputs="text") | |
if __name__ == "__main__": | |
iface.launch() |