Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -181,8 +181,7 @@ def generate_text_better_sampling(model, prompt, max_len=100, max_gen=98, top_k=
|
|
181 |
|
182 |
yield decoded_text
|
183 |
|
184 |
-
|
185 |
-
nickname = "์ฌ์ฉ์"
|
186 |
|
187 |
def respond(message, chat_history):
|
188 |
message = message.replace("@์ฌ์ฉ์1@", nickname)
|
@@ -191,9 +190,28 @@ def respond(message, chat_history):
|
|
191 |
response = partial
|
192 |
yield response
|
193 |
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
yield decoded_text
|
183 |
|
184 |
+
nickname = "์ฌ์ฉ์1"
|
|
|
185 |
|
186 |
def respond(message, chat_history):
|
187 |
message = message.replace("@์ฌ์ฉ์1@", nickname)
|
|
|
190 |
response = partial
|
191 |
yield response
|
192 |
|
193 |
+
css = """
|
194 |
+
.chatbot {
|
195 |
+
background-color: #222;
|
196 |
+
color: #eee;
|
197 |
+
border-radius: 10px;
|
198 |
+
padding: 15px;
|
199 |
+
font-family: '๋๋๊ณ ๋', monospace;
|
200 |
+
}
|
201 |
+
.input-area textarea {
|
202 |
+
background-color: #333;
|
203 |
+
color: #eee;
|
204 |
+
border-radius: 8px;
|
205 |
+
border: none;
|
206 |
+
padding: 10px;
|
207 |
+
font-size: 16px;
|
208 |
+
}
|
209 |
+
"""
|
210 |
+
|
211 |
+
with gr.Blocks(css=css) as demo:
|
212 |
+
chatbot = gr.Chatbot(elem_classes="chatbot")
|
213 |
+
txt = gr.Textbox(show_label=False, placeholder="๋ฉ์์ง๋ฅผ ์
๋ ฅํ์ธ์...")
|
214 |
+
txt.submit(respond, [txt, chatbot], chatbot)
|
215 |
+
txt.submit(lambda: "", None, txt) # ์
๋ ฅ์ฐฝ ํด๋ฆฌ์ด
|
216 |
+
|
217 |
+
demo.launch()
|