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() | |