Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files56 unmodified lines57585960616263643 unmodified lines6869707172737456 unmodified lineshistory = 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})return history, ""with gr.Blocks(title="Devrayog AI") as demo:3 unmodified lineswith 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")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")56 unmodified lines575859606162633 unmodified lines6768697071727356 unmodified lineshistory = history or []prefix = {"Agni": "π₯ ", "Vayu": "π ", "Akash": "π "}.get(model, "π₯ ")response = get_response(message)history.append((message, prefix + response))return history, ""with gr.Blocks(title="Devrayog AI") as demo:3 unmodified lineswith 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)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