sgecon / app.py
jaeyoungk's picture
Update app.py
668a8e3
raw
history blame
399 Bytes
import gradio as gr
from transformers import pipeline
# Hugging Face์—์„œ ๋ชจ๋ธ ๋กœ๋“œ
qa_model = pipeline("question-answering", model="RAIJAY/7B_QA_68348")
# Gradio ์ธํ„ฐํŽ˜์ด์Šค ์ •์˜
def question_answering(question):
answer = qa_model(question)["answer"]
return answer
iface = gr.Interface(fn=question_answering, inputs="text", outputs="text")
# Gradio ์•ฑ ์‹คํ–‰
iface.launch()