Spaces:
Runtime error
Runtime error
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()''' | |