Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -68,13 +68,12 @@ def check_rand(inp,val):
|
|
68 |
|
69 |
with gr.Blocks() as app:
|
70 |
gr.HTML("""<center><h1 style='font-size:xx-large;'>Google Gemma Models</h1><br><h3>running on Huggingface Inference Client</h3><br><h7>EXPERIMENTAL""")
|
|
|
71 |
with gr.Group():
|
72 |
-
chat_b = gr.Chatbot(height=500)
|
73 |
with gr.Row():
|
74 |
with gr.Column(scale=3):
|
75 |
inp = gr.Textbox(label="Prompt")
|
76 |
sys_inp = gr.Textbox(label="System Prompt (optional)")
|
77 |
-
client_choice=gr.Dropdown(label="Models",type='index',choices=[c for c in models],value=models[0],interactive=True)
|
78 |
with gr.Row():
|
79 |
with gr.Column(scale=2):
|
80 |
btn = gr.Button("Chat")
|
@@ -82,9 +81,11 @@ with gr.Blocks() as app:
|
|
82 |
with gr.Group():
|
83 |
stop_btn=gr.Button("Stop")
|
84 |
clear_btn=gr.Button("Clear")
|
|
|
|
|
85 |
with gr.Column(scale=1):
|
86 |
with gr.Group():
|
87 |
-
rand = gr.Checkbox(label="Random", value=True)
|
88 |
seed=gr.Slider(label="Seed", minimum=1, maximum=1111111111111111,step=1, value=rand_val)
|
89 |
tokens = gr.Slider(label="Max new tokens",value=6400,minimum=0,maximum=8000,step=64,interactive=True, visible=True,info="The maximum number of tokens")
|
90 |
temp=gr.Slider(label="Temperature",step=0.01, minimum=0.01, maximum=1.0, value=0.9)
|
|
|
68 |
|
69 |
with gr.Blocks() as app:
|
70 |
gr.HTML("""<center><h1 style='font-size:xx-large;'>Google Gemma Models</h1><br><h3>running on Huggingface Inference Client</h3><br><h7>EXPERIMENTAL""")
|
71 |
+
chat_b = gr.Chatbot(height=500)
|
72 |
with gr.Group():
|
|
|
73 |
with gr.Row():
|
74 |
with gr.Column(scale=3):
|
75 |
inp = gr.Textbox(label="Prompt")
|
76 |
sys_inp = gr.Textbox(label="System Prompt (optional)")
|
|
|
77 |
with gr.Row():
|
78 |
with gr.Column(scale=2):
|
79 |
btn = gr.Button("Chat")
|
|
|
81 |
with gr.Group():
|
82 |
stop_btn=gr.Button("Stop")
|
83 |
clear_btn=gr.Button("Clear")
|
84 |
+
client_choice=gr.Dropdown(label="Models",type='index',choices=[c for c in models],value=models[0],interactive=True)
|
85 |
+
|
86 |
with gr.Column(scale=1):
|
87 |
with gr.Group():
|
88 |
+
rand = gr.Checkbox(label="Random Seed", value=True)
|
89 |
seed=gr.Slider(label="Seed", minimum=1, maximum=1111111111111111,step=1, value=rand_val)
|
90 |
tokens = gr.Slider(label="Max new tokens",value=6400,minimum=0,maximum=8000,step=64,interactive=True, visible=True,info="The maximum number of tokens")
|
91 |
temp=gr.Slider(label="Temperature",step=0.01, minimum=0.01, maximum=1.0, value=0.9)
|