Update app.py
Browse files
app.py
CHANGED
|
@@ -1,19 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from inference_fine_tune import generate_response
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
with gr.Row():
|
| 12 |
-
inp = gr.Textbox(label="Your Prompt", placeholder="Enter your message...", lines=3)
|
| 13 |
-
out = gr.Textbox(label="Model Response", lines=10)
|
| 14 |
-
|
| 15 |
-
btn = gr.Button("Send")
|
| 16 |
-
# ✅ Enable streaming to allow generator output to be rendered step-by-step
|
| 17 |
-
btn.click(chat_interface, inputs=inp, outputs=out, streaming=True)
|
| 18 |
-
|
| 19 |
-
demo.launch(share=True)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from inference_fine_tune import generate_response
|
| 3 |
+
|
| 4 |
+
with gr.ChatInterface(
|
| 5 |
+
fn=generate_response,
|
| 6 |
+
title="🧠 Chat with Fine-Tuned Model",
|
| 7 |
+
description="Ask me anything using your custom fine-tuned LLM.",
|
| 8 |
+
theme="soft",
|
| 9 |
+
) as demo:
|
| 10 |
+
demo.launch(share=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|