
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
inputs parameter 에 text box 두개를 사용했어요.
examples parameter를 사용하고 싶은데요 , 이렇게 저렇게 해봐도 에러가 납니다.
도와주세요 .
보고 계신 화면 전체를

캡처해 주시면, 튜터님들이 빠르게 상황을 이해할 수 있어요.
from transformers import pipeline
import gradio as gr
#질의응답
question_answerer = pipeline("question-answering")
"""
result = question_answerer(
question="Where do I work?",
context="My name is Jiwoong and I work at Spartacoding Club in Seoul.",
)
"""
def answering (text,description):
result = question_answerer(
question = text,
context = description,
)
#answerdic ={}
#print(type(result))
# for entity in result:
# print (entity)
return result['answer'],result['score']
interface = gr.Interface(
fn = answering,
inputs = [gr.Textbox(label="Question"),gr.Textbox(label="Text for question")],
outputs = gr.Textbox(label ='Result'),
#examples=["Where do I work?","My name is Jiwoong and I work at Spartacoding Club in Seoul."],
)
interface.launch(debug=True,share=True)
