Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,7 @@ from typing import List, Tuple
|
|
6 |
client = InferenceClient("microsoft/phi-4")
|
7 |
|
8 |
# Define the system message
|
9 |
-
system_message = "You're an advanced AI assistant designed to engage in friendly and informative conversations. Your role is to respond to user queries with helpful, clear, and concise answers, while maintaining a conversational tone. You can provide advice, explanations, and solutions based on user input.
|
10 |
-
|
11 |
-
"
|
12 |
|
13 |
# Define the response function
|
14 |
def respond(
|
@@ -55,7 +53,7 @@ def respond(
|
|
55 |
demo = gr.Interface(
|
56 |
fn=respond,
|
57 |
inputs=[
|
58 |
-
gr.Textbox(value=system_message, label="System message"),
|
59 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
60 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
61 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|
|
|
6 |
client = InferenceClient("microsoft/phi-4")
|
7 |
|
8 |
# Define the system message
|
9 |
+
system_message = "You're an advanced AI assistant designed to engage in friendly and informative conversations. Your role is to respond to user queries with helpful, clear, and concise answers, while maintaining a conversational tone. You can provide advice, explanations, and solutions based on user input."
|
|
|
|
|
10 |
|
11 |
# Define the response function
|
12 |
def respond(
|
|
|
53 |
demo = gr.Interface(
|
54 |
fn=respond,
|
55 |
inputs=[
|
56 |
+
gr.Textbox(value=system_message, label="System message", interactive=False), # Set this to non-editable
|
57 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
58 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
59 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|