Untitled
unknown
plain_text
2 months ago
501 B
1
Indexable
!pip install gradio transformers import gradio as gr from transformers import pipeline qa_pipeline = pipeline("question-answering", model="distilbert-base-uncased-distilled-squad") def qa_func(context, question): return qa_pipeline(question = question, context = context) return result ["answer"] interface = gr.Interface(fn=qa_func, inputs=["text","text"], outputs="text", live=True) interface.launch()
Editor is loading...
Leave a Comment