Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
-
# Load Luna from HF Hub
|
5 |
client = InferenceClient("cosmosai471/Luna-v2")
|
6 |
|
7 |
def respond(
|
@@ -34,17 +33,16 @@ def respond(
|
|
34 |
response += token
|
35 |
yield response
|
36 |
|
37 |
-
# Build the interface
|
38 |
demo = gr.ChatInterface(
|
39 |
fn=respond,
|
40 |
additional_inputs=[
|
41 |
-
gr.Textbox(value="You are a friendly AI
|
42 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
43 |
gr.Slider(minimum=0.1, maximum=2.0, value=0.7, step=0.1, label="Temperature"),
|
44 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p"),
|
45 |
],
|
46 |
title="Luna AI - Chat & Code",
|
47 |
-
description="
|
48 |
theme="default"
|
49 |
)
|
50 |
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
|
|
4 |
client = InferenceClient("cosmosai471/Luna-v2")
|
5 |
|
6 |
def respond(
|
|
|
33 |
response += token
|
34 |
yield response
|
35 |
|
|
|
36 |
demo = gr.ChatInterface(
|
37 |
fn=respond,
|
38 |
additional_inputs=[
|
39 |
+
gr.Textbox(value="You are a helpful and friendly AI.", label="System message"),
|
40 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
41 |
gr.Slider(minimum=0.1, maximum=2.0, value=0.7, step=0.1, label="Temperature"),
|
42 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p"),
|
43 |
],
|
44 |
title="Luna AI - Chat & Code",
|
45 |
+
description="Chat with Luna. She can generate code with web-enhanced context.",
|
46 |
theme="default"
|
47 |
)
|
48 |
|