Spaces:
Runtime error
Runtime error
TA
commited on
Commit
·
5b7a61e
1
Parent(s):
1a03255
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,18 +7,41 @@ TITLE = "Image Prompter"
|
|
| 7 |
EXAMPLE_INPUT = "A Reflective cat between stars."
|
| 8 |
|
| 9 |
# Path to your local image file
|
| 10 |
-
enticing_image_path =
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
|
| 24 |
|
|
@@ -78,6 +101,6 @@ Expand your imagination and broaden your horizons with LLM. Welcome to **{TITLE}
|
|
| 78 |
chatbot_preview = gr.Chatbot(layout="panel", value=[(None, welcome_preview_message)])
|
| 79 |
textbox_preview = gr.Textbox(scale=7, container=False, value=EXAMPLE_INPUT)
|
| 80 |
|
| 81 |
-
demo = gr.ChatInterface(test_preview_chatbot, chatbot=chatbot_preview, textbox=textbox_preview, title=None,
|
| 82 |
|
| 83 |
demo.launch(share=True)
|
|
|
|
| 7 |
EXAMPLE_INPUT = "A Reflective cat between stars."
|
| 8 |
|
| 9 |
# Path to your local image file
|
| 10 |
+
enticing_image_path = "C:/Users/alain/Downloads/enticing_image.jpg"
|
| 11 |
+
|
| 12 |
+
style = """
|
| 13 |
+
div {
|
| 14 |
+
text-align: center;
|
| 15 |
+
background-color: #f4f4f4;
|
| 16 |
+
padding: 20px;
|
| 17 |
+
border-radius: 10px;
|
| 18 |
+
position: relative;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
h1 {
|
| 22 |
+
color: #333;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
img.enticing {
|
| 26 |
+
width: 100px;
|
| 27 |
+
height: 100px;
|
| 28 |
+
border-radius: 50%;
|
| 29 |
+
position: absolute;
|
| 30 |
+
top: 0;
|
| 31 |
+
right: 0;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
img.main {
|
| 35 |
+
width: 300px;
|
| 36 |
+
height: 300px;
|
| 37 |
+
border-radius: 50%;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
p {
|
| 41 |
+
font-size: 18px;
|
| 42 |
+
color: #555;
|
| 43 |
+
}
|
| 44 |
+
"""
|
| 45 |
|
| 46 |
zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
|
| 47 |
|
|
|
|
| 101 |
chatbot_preview = gr.Chatbot(layout="panel", value=[(None, welcome_preview_message)])
|
| 102 |
textbox_preview = gr.Textbox(scale=7, container=False, value=EXAMPLE_INPUT)
|
| 103 |
|
| 104 |
+
demo = gr.ChatInterface(test_preview_chatbot, chatbot=chatbot_preview, textbox=textbox_preview, title=None, style=style)
|
| 105 |
|
| 106 |
demo.launch(share=True)
|