Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,21 +31,34 @@ def generate_text(prompt):
|
|
| 31 |
text = tokenizer.decode(beam_output[0], skip_special_tokens=True)
|
| 32 |
return text
|
| 33 |
|
|
|
|
|
|
|
|
|
|
| 34 |
css = """
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
"""
|
| 44 |
|
| 45 |
iface = gr.Interface(
|
| 46 |
fn=generate_text,
|
| 47 |
-
|
| 48 |
outputs=gr.Textbox(label="Löwolf Chat Responses", placeholder="Responses will appear here...", interactive=False, lines=10),
|
|
|
|
| 49 |
css=css
|
| 50 |
)
|
| 51 |
|
|
|
|
| 31 |
text = tokenizer.decode(beam_output[0], skip_special_tokens=True)
|
| 32 |
return text
|
| 33 |
|
| 34 |
+
DESCRIPTION = """\
|
| 35 |
+
#Löwolf GPT1 Chat
|
| 36 |
+
"""
|
| 37 |
css = """
|
| 38 |
+
h1 {
|
| 39 |
+
text-align: center;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
#duplicate-button {
|
| 43 |
+
margin: auto;
|
| 44 |
+
color: white;
|
| 45 |
+
background: #1565c0;
|
| 46 |
+
border-radius: 100vh;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.contain {
|
| 50 |
+
max-width: 900px;
|
| 51 |
+
margin: auto;
|
| 52 |
+
padding-top: 1.5rem;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
"""
|
| 56 |
|
| 57 |
iface = gr.Interface(
|
| 58 |
fn=generate_text,
|
| 59 |
+
|
| 60 |
outputs=gr.Textbox(label="Löwolf Chat Responses", placeholder="Responses will appear here...", interactive=False, lines=10),
|
| 61 |
+
inputs=gr.Textbox(lines=2, placeholder="Type a message...", label="Your Message"),
|
| 62 |
css=css
|
| 63 |
)
|
| 64 |
|