yu-rp
commited on
Commit
Β·
ba04255
1
Parent(s):
3a08b56
disable the online demo
Browse files
app.py
CHANGED
@@ -62,7 +62,8 @@ def write2file(path, content):
|
|
62 |
with open(path, "a") as fout:
|
63 |
fout.write(content)
|
64 |
|
65 |
-
model, processor = get_model("cuda:0")
|
|
|
66 |
|
67 |
get_window_url_params = """
|
68 |
function() {
|
@@ -485,12 +486,17 @@ def build_demo():
|
|
485 |
"assets/assistant.png",
|
486 |
],
|
487 |
bubble_full_width=False,
|
|
|
|
|
|
|
488 |
)
|
489 |
with gr.Row():
|
490 |
with gr.Column(scale=8):
|
491 |
textbox.render()
|
|
|
492 |
with gr.Column(scale=1, min_width=50):
|
493 |
submit_btn = gr.Button(value="Send", variant="primary")
|
|
|
494 |
with gr.Row(elem_id="buttons") as button_row:
|
495 |
upvote_btn = gr.Button(value="π Upvote", interactive=False)
|
496 |
downvote_btn = gr.Button(value="π Downvote", interactive=False)
|
@@ -500,6 +506,11 @@ def build_demo():
|
|
500 |
value="π Regenerate", interactive=False
|
501 |
)
|
502 |
clear_btn = gr.Button(value="ποΈ Clear", interactive=False)
|
|
|
|
|
|
|
|
|
|
|
503 |
|
504 |
gr.Markdown(tos_markdown)
|
505 |
url_params = gr.JSON(visible=False)
|
|
|
62 |
with open(path, "a") as fout:
|
63 |
fout.write(content)
|
64 |
|
65 |
+
# model, processor = get_model("cuda:0")
|
66 |
+
model, processor = None, None
|
67 |
|
68 |
get_window_url_params = """
|
69 |
function() {
|
|
|
486 |
"assets/assistant.png",
|
487 |
],
|
488 |
bubble_full_width=False,
|
489 |
+
value=[
|
490 |
+
("What happened to the Dimple Demo?", "π« We can no longer afford to host this Hugging Face demo. You may try the demo code in our github repo and run it locally."),
|
491 |
+
],
|
492 |
)
|
493 |
with gr.Row():
|
494 |
with gr.Column(scale=8):
|
495 |
textbox.render()
|
496 |
+
textbox.interactive = False
|
497 |
with gr.Column(scale=1, min_width=50):
|
498 |
submit_btn = gr.Button(value="Send", variant="primary")
|
499 |
+
submit_btn.interactive = False
|
500 |
with gr.Row(elem_id="buttons") as button_row:
|
501 |
upvote_btn = gr.Button(value="π Upvote", interactive=False)
|
502 |
downvote_btn = gr.Button(value="π Downvote", interactive=False)
|
|
|
506 |
value="π Regenerate", interactive=False
|
507 |
)
|
508 |
clear_btn = gr.Button(value="ποΈ Clear", interactive=False)
|
509 |
+
upvote_btn.interactive = False
|
510 |
+
downvote_btn.interactive = False
|
511 |
+
flag_btn.interactive = False
|
512 |
+
regenerate_btn.interactive = False
|
513 |
+
clear_btn.interactive = False
|
514 |
|
515 |
gr.Markdown(tos_markdown)
|
516 |
url_params = gr.JSON(visible=False)
|