logs / app.py
isimorfizam's picture
Create app.py
07765e8 verified
raw
history blame
482 Bytes
import gradio as gr
from transformers import pipeline
pipeline = pipeline(task="feedback-distilbert", model="isimorfizam/distilbert-base-cased-distilled-squad-feedback")
def predict(question):
question_answerer = pipeline("question-answering", model=MODEL_CHECKPOINT)
return question_answerer(question=question,context=context)
gradio_app = gr.Interface(
predict,
inputs=str,
outputs=str,
title='QA',
)
if __name__ == "__main__":
gradio_app.launch()