Spaces:
Running
Running
csabakecskemeti
commited on
Commit
•
c79e399
1
Parent(s):
71d0a2d
Update app.py
Browse files
app.py
CHANGED
@@ -62,14 +62,26 @@ def chat(input, chat_history, top_k, top_p, temp):
|
|
62 |
|
63 |
|
64 |
######################### Gradio Code ##########################
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
with block:
|
68 |
|
69 |
gr.Markdown("""<h1><center> Trashcan AI </center></h1>""")
|
70 |
gr.Markdown("""<h3><center> LLama3.1 hosted on a 2013 "Trashcan" Mac Pro with ollama </center></h3>""")
|
71 |
|
72 |
-
|
|
|
73 |
message = gr.Textbox(placeholder="Type here")
|
74 |
|
75 |
state = gr.State()
|
|
|
62 |
|
63 |
|
64 |
######################### Gradio Code ##########################
|
65 |
+
# background-image: url('https://cdn.shoplightspeed.com/shops/631940/files/45845092/800x800x3/apple-apple-macpro-trashcan-12-core-27ghz-64gb-1tb.jpg');
|
66 |
+
block = gr.Blocks(css="""
|
67 |
+
.chatbox {
|
68 |
+
background-image: url('https://cdn.shoplightspeed.com/shops/631940/files/45845092/800x800x3/apple-apple-macpro-trashcan-12-core-27ghz-64gb-1tb.jpg');
|
69 |
+
background-size: contain; /* Ensure the image fits the height */
|
70 |
+
background-repeat: no-repeat;
|
71 |
+
background-position: center;
|
72 |
+
height: 100%; /* Make the chatbox fill the available height */
|
73 |
+
}
|
74 |
+
""")
|
75 |
+
|
76 |
+
|
77 |
|
78 |
with block:
|
79 |
|
80 |
gr.Markdown("""<h1><center> Trashcan AI </center></h1>""")
|
81 |
gr.Markdown("""<h3><center> LLama3.1 hosted on a 2013 "Trashcan" Mac Pro with ollama </center></h3>""")
|
82 |
|
83 |
+
# Add a custom class 'chatbox' to apply the background image
|
84 |
+
chatbot = gr.Chatbot(elem_classes="chatbox")
|
85 |
message = gr.Textbox(placeholder="Type here")
|
86 |
|
87 |
state = gr.State()
|