Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -320,98 +320,5 @@ with gr.Blocks(analytics_enabled=False,
|
|
320 |
""",
|
321 |
)
|
322 |
|
323 |
-
demo.queue(concurrency_count=16).launch(debug=True, share=True)
|
324 |
-
|
325 |
-
# with gr.Row():
|
326 |
-
# with gr.Box():
|
327 |
-
# output = gr.Markdown()
|
328 |
-
# chatbot = gr.Chatbot(elem_id="chat-message", label="Chat")
|
329 |
-
#
|
330 |
-
# with gr.Row():
|
331 |
-
# with gr.Column(scale=3):
|
332 |
-
# user_message = gr.Textbox(placeholder="Enter your message here", show_label=False, elem_id="q-input")
|
333 |
-
# with gr.Row():
|
334 |
-
# send_button = gr.Button("Send", elem_id="send-btn", visible=True)
|
335 |
-
#
|
336 |
-
# clear_chat_button = gr.Button("Clear chat", elem_id="clear-btn", visible=True)
|
337 |
-
#
|
338 |
-
# with gr.Accordion(label="Parameters", open=False, elem_id="parameters-accordion"):
|
339 |
-
# temperature = gr.Slider(
|
340 |
-
# label="Temperature",
|
341 |
-
# value=0.7,
|
342 |
-
# minimum=0.0,
|
343 |
-
# maximum=1.0,
|
344 |
-
# step=0.1,
|
345 |
-
# interactive=True,
|
346 |
-
# info="Higher values produce more diverse outputs",
|
347 |
-
# )
|
348 |
-
# top_p = gr.Slider(
|
349 |
-
# label="Top-p (nucleus sampling)",
|
350 |
-
# value=0.9,
|
351 |
-
# minimum=0.0,
|
352 |
-
# maximum=1,
|
353 |
-
# step=0.05,
|
354 |
-
# interactive=True,
|
355 |
-
# info="Higher values sample more low-probability tokens",
|
356 |
-
# )
|
357 |
-
# max_new_tokens = gr.Slider(
|
358 |
-
# label="Max new tokens",
|
359 |
-
# value=1024,
|
360 |
-
# minimum=0,
|
361 |
-
# maximum=2048,
|
362 |
-
# step=4,
|
363 |
-
# interactive=True,
|
364 |
-
# info="The maximum numbers of new tokens",
|
365 |
-
# )
|
366 |
-
# repetition_penalty = gr.Slider(
|
367 |
-
# label="Repetition Penalty",
|
368 |
-
# value=1.2,
|
369 |
-
# minimum=0.0,
|
370 |
-
# maximum=10,
|
371 |
-
# step=0.1,
|
372 |
-
# interactive=True,
|
373 |
-
# info="The parameter for repetition penalty. 1.0 means no penalty.",
|
374 |
-
# )
|
375 |
-
# with gr.Row():
|
376 |
-
# gr.Examples(
|
377 |
-
# examples=examples,
|
378 |
-
# inputs=[user_message],
|
379 |
-
# cache_examples=False,
|
380 |
-
# fn=process_example,
|
381 |
-
# outputs=[output],
|
382 |
-
# )
|
383 |
-
#
|
384 |
-
# history = gr.State([])
|
385 |
-
# last_user_message = gr.State("")
|
386 |
-
#
|
387 |
-
# user_message.submit(
|
388 |
-
# generate,
|
389 |
-
# inputs=[
|
390 |
-
# user_message,
|
391 |
-
# chatbot,
|
392 |
-
# history,
|
393 |
-
# temperature,
|
394 |
-
# top_p,
|
395 |
-
# max_new_tokens,
|
396 |
-
# repetition_penalty,
|
397 |
-
# ],
|
398 |
-
# outputs=[chatbot, history, last_user_message, user_message],
|
399 |
-
# )
|
400 |
-
#
|
401 |
-
# send_button.click(
|
402 |
-
# generate,
|
403 |
-
# inputs=[
|
404 |
-
# user_message,
|
405 |
-
# chatbot,
|
406 |
-
# history,
|
407 |
-
# temperature,
|
408 |
-
# top_p,
|
409 |
-
# max_new_tokens,
|
410 |
-
# repetition_penalty,
|
411 |
-
# ],
|
412 |
-
# outputs=[chatbot, history, last_user_message, user_message],
|
413 |
-
# )
|
414 |
-
#
|
415 |
-
# clear_chat_button.click(clear_chat, outputs=[chatbot, history])
|
416 |
|
417 |
demo.queue(concurrency_count=16).launch(debug=True)
|
|
|
320 |
""",
|
321 |
)
|
322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
|
324 |
demo.queue(concurrency_count=16).launch(debug=True)
|