Spaces:
Runtime error
Runtime error
TA
commited on
Commit
·
bad446d
1
Parent(s):
73d1565
Update app.py
Browse files
app.py
CHANGED
@@ -8,11 +8,12 @@ import requests
|
|
8 |
html_temp = """
|
9 |
<div style="position: absolute; top: 0; right: 0;">
|
10 |
<img src='https://huggingface.co/spaces/NerdN/open-gpt-Image-Prompter/blob/main/_45a03b4d-ea0f-4b81-873d-ff6b10461d52.jpg' alt='Your Image' style='width:100px;height:100px;'>
|
|
|
11 |
</div>
|
12 |
<div style="position: absolute; bottom: 0; left: 0;">
|
13 |
<p>Please like the space!</p>
|
14 |
</div>
|
15 |
-
"""
|
16 |
|
17 |
zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
|
18 |
|
@@ -81,6 +82,6 @@ Expand your imagination and broaden your horizons with LLM. Welcome to **{TITLE}
|
|
81 |
chatbot_preview = gr.Chatbot(layout="panel", value=[(None, welcome_preview_message)])
|
82 |
textbox_preview = gr.Textbox(scale=7, container=False, value=EXAMPLE_INPUT)
|
83 |
|
84 |
-
|
85 |
|
86 |
-
|
|
|
8 |
html_temp = """
|
9 |
<div style="position: absolute; top: 0; right: 0;">
|
10 |
<img src='https://huggingface.co/spaces/NerdN/open-gpt-Image-Prompter/blob/main/_45a03b4d-ea0f-4b81-873d-ff6b10461d52.jpg' alt='Your Image' style='width:100px;height:100px;'>
|
11 |
+
<p style="text-align: right;">{}</p>
|
12 |
</div>
|
13 |
<div style="position: absolute; bottom: 0; left: 0;">
|
14 |
<p>Please like the space!</p>
|
15 |
</div>
|
16 |
+
""".format(EXAMPLE_INPUT)
|
17 |
|
18 |
zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
|
19 |
|
|
|
82 |
chatbot_preview = gr.Chatbot(layout="panel", value=[(None, welcome_preview_message)])
|
83 |
textbox_preview = gr.Textbox(scale=7, container=False, value=EXAMPLE_INPUT)
|
84 |
|
85 |
+
demo = gr.Interface(fn=test_preview_chatbot, inputs=chatbot_preview, outputs=textbox_preview, title=TITLE, description=SYSTEM_PROMPT, examples=[EXAMPLE_INPUT], allow_flagging=False, analytics_enabled=False, theme="huggingface")
|
86 |
|
87 |
+
demo.launch(share=True)
|