:lipstick: keep chat interface filling the screen
Browse files
app.py
CHANGED
@@ -91,7 +91,19 @@ def initial_model(referer=None):
|
|
91 |
return o.choice(model_choices)[1]
|
92 |
|
93 |
title_text="HuggingFace's missing inference widget"
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
gr.HTML("""
|
96 |
<h1 align="center">HuggingFace's missing inference widget</h1>
|
97 |
<p align="center">
|
|
|
91 |
return o.choice(model_choices)[1]
|
92 |
|
93 |
title_text="HuggingFace's missing inference widget"
|
94 |
+
css = """
|
95 |
+
.logo-mark { fill: #ffe184; }
|
96 |
+
|
97 |
+
/* from https://github.com/gradio-app/gradio/issues/4001
|
98 |
+
* necessary as putting ChatInterface in gr.Blocks changes behaviour
|
99 |
+
*/
|
100 |
+
|
101 |
+
.contain { display: flex; flex-direction: column; }
|
102 |
+
.gradio-container { height: 100vh !important; }
|
103 |
+
#component-0 { height: 100%; }
|
104 |
+
#chatbot { flex-grow: 1; overflow: auto;}
|
105 |
+
"""
|
106 |
+
with gr.Blocks(title_text, css=css) as demo:
|
107 |
gr.HTML("""
|
108 |
<h1 align="center">HuggingFace's missing inference widget</h1>
|
109 |
<p align="center">
|