Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files56 unmodified lines5758596061606162633 unmodified lines676869717071727356 unmodified lines history = history or []
prefix = {"Agni": "🔥 ", "Vayu": "🌊 ", "Akash": "🌌 "}.get(model, "🔥 ")
response = get_response(message)
history.append({"role": "user", "content": message})
history.append({"role": "assistant", "content": prefix + response})
history.append((message, prefix + response))
return history, ""
with gr.Blocks(title="Devrayog AI") as demo:3 unmodified lines with gr.Row():
with gr.Column(scale=3):
model = gr.Radio(["Agni", "Vayu", "Akash"], value="Agni", label="Model")
chatbot = gr.Chatbot(height=350, show_label=False, type="messages")
chatbot = gr.Chatbot(height=350, show_label=False)
with gr.Row():
msg = gr.Textbox(placeholder="Ask about SSB, NDA, TAT...", scale=4, container=False, autofocus=True)
send = gr.Button("Send", scale=1, variant="primary")app.py+2-3