Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,9 @@ def respond(
|
|
6 |
history: list[tuple[str, str]],
|
7 |
system_message,
|
8 |
max_tokens,
|
9 |
-
temperature,
|
10 |
-
top_p,
|
11 |
):
|
12 |
-
# We won't stream but return full output for simplicity
|
13 |
try:
|
14 |
-
result = smart_luna_answer(message, max_tokens=max_tokens
|
15 |
return result
|
16 |
except Exception as e:
|
17 |
return f"Error: {str(e)}"
|
@@ -21,8 +18,6 @@ demo = gr.ChatInterface(
|
|
21 |
additional_inputs=[
|
22 |
gr.Textbox(value="You are a helpful AI assistant.", label="System message"),
|
23 |
gr.Slider(minimum=128, maximum=2048, value=512, step=1, label="Max new tokens"),
|
24 |
-
gr.Slider(minimum=0.1, maximum=1.5, value=0.7, step=0.1, label="Temperature"),
|
25 |
-
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p"),
|
26 |
],
|
27 |
title="Luna AI — Code & Web Enhanced Assistant",
|
28 |
description="Ask Luna questions, generate code, and explore smart AI-powered answers with web context!",
|
|
|
6 |
history: list[tuple[str, str]],
|
7 |
system_message,
|
8 |
max_tokens,
|
|
|
|
|
9 |
):
|
|
|
10 |
try:
|
11 |
+
result = smart_luna_answer(message, max_tokens=max_tokens)
|
12 |
return result
|
13 |
except Exception as e:
|
14 |
return f"Error: {str(e)}"
|
|
|
18 |
additional_inputs=[
|
19 |
gr.Textbox(value="You are a helpful AI assistant.", label="System message"),
|
20 |
gr.Slider(minimum=128, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
|
|
|
21 |
],
|
22 |
title="Luna AI — Code & Web Enhanced Assistant",
|
23 |
description="Ask Luna questions, generate code, and explore smart AI-powered answers with web context!",
|