Askme / app.py
gamin
gamin
f3e20f8
raw
history blame contribute delete
946 Bytes
import gradio as gr
def answer_question(question):
# 여기에 질문데 λŒ€ν•œ λ‹΅λ³€ λ‘œμ§μ„ κ΅¬ν˜„ν•©λ‹ˆλ‹€.
# μ˜ˆμ‹œλ‘œ κ°„λ‹¨ν•œ 닡변을 λ°˜ν™˜ν•©λ‹ˆλ‹€.
return f"λͺ°λΌμš”"
demo = gr.Interface(
fn=answer_question,
inputs="text",
outputs="text",
title="무엇이든 λ¬Όμ–΄λ³΄μ†Œ, λ‚΄κ°€ μ•„λ‚˜?",
description="μ§ˆλ¬Έμ„ μž…λ ₯ν•˜λ©΄ 닡변을 μ œκ³΅ν•  것 κ°™λ‹ˆ? <b><span style=\"color:red;\">γ…‹γ…‹γ…‹</span></b>",
# description="μ§ˆλ¬Έμ„ μž…λ ₯ν•˜λ©΄ 닡변을 μ œκ³΅ν•  것 κ°™λ‹ˆ? <b><span style=\"color:red;\">γ…‹γ…‹γ…‹</span></b> </br><img src=μ΄λ―Έμ§€λ§ν¬μ£Όμ†Œ>",
examples=[
["였늘 날씨 μ–΄λ•Œ?"],
["인곡지λŠ₯이 뭐야?"],
["νŒŒμ΄μ¬μ€ μ–΄λ–€ μ–Έμ–΄μ•Ό?"],
["κ·Έλƒ₯ μ•„λ¬΄κ±°λ‚˜ 물어봐"]
]
)
demo.launch(share=True) # κ³΅μœ κ°€λŠ₯ν•œ 링크 생성?
# examples 같은 κΈ°λŠ₯ μ΄μš©ν•˜λ©΄ μžλ°”μŠ€ν¬λ¦½νŠΈλ‘œ κ΅¬ν˜„ μ•ˆν•΄λ„ 됨