thanglekdi's picture
them file
da5015b
raw
history blame
566 Bytes
# app.py
import gradio as gr
import phoGPT
respond = phoGPT.respond()
# 3️⃣ Giao diện Gradio
demo = gr.ChatInterface(
respond, #câu phản hồi
additional_inputs=[
gr.Textbox("Bạn là một chatbot tiếng Việt thân thiện.", label="System message"),
gr.Slider(1, 2048, value=512, step=1, label="Max new tokens"),
gr.Slider(0.1, 4.0, value=0.7, step=0.1, label="Temperature"),
gr.Slider(0.1, 1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
],
)
if __name__ == "__main__":
demo.launch()