chatmgf / app.py
diogocarapito's picture
Update app.py
3bbfa05
raw
history blame
455 Bytes
import gradio as gr
from transformers import pipeline
gr.Interface.load("models/deepset/roberta-base-squad2-distilled").launch()
'''
modes_name = "deepset/roberta-base-squad2"
pipe = pipeline("question-answering", model=model_name, tokenizer=model_name)
def predict(text):
return pipe(text)[0]["translation_text"]
iface = gr.Interface(
fn=predict,
inputs='text',
outputs='text',
examples=[["Hello! My name is Omar"]]
)
iface.launch()'''