Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from chatbot import chatbot_response | |
| from huggingface_hub import InferenceClient | |
| __author__ = "songhune" | |
| """ | |
| For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference | |
| """ | |
| client = InferenceClient("HuggingFaceH4/zephyr-7b-beta") | |
| cases = ["λ°νκ° λ§ν 건 μ μλͺ»λ μ’ μμ§λ§, νμ₯λμ μ무κ²λ μ νλ©΄μ μ΄λ¬λ 건 μ λμκ±°μ£ .", "μ¬νμ§λ‘ μ μ£Όλ μ΄λ? λ μ λ§ κ±°κΈ° κ°λ³΄κ³ μΆμμ΄", "λ΄ λ§ν¬κ° κ·Έλ κ² μ΄μνμ΄?", "μ’ λ£"] | |
| # Gradio interface | |
| iface = gr.ChatInterface( | |
| fn=chatbot_response, | |
| title="κ°μ€λΌμ΄ν μ±λ΄", | |
| description="λΉμ μ κ°μ€λΌμ΄ν μ μΌμΌλ μ±λ΄κ³Ό λννκ³ μμ΅λλ€. μλ μμ μ€ μμνκ³ μ νλ μλ리μ€λ₯Ό μ νν΄ μ£ΌμΈμ. μ’ λ£λ₯Ό μνμλ©΄ \"μ’ λ£\"λ₯Ό μ λ ₯νμκ±°λ ν΄λ¦ν΄ μ£ΌμΈμ.", | |
| examples=[[case] for case in cases] | |
| ) | |
| iface.launch() | |