Spaces:
Sleeping
Sleeping
Commit
·
c7d4293
1
Parent(s):
5c1bfe9
Update app.py
Browse files
app.py
CHANGED
@@ -173,13 +173,23 @@ def generate_shakespeare_outputs(prompt=None, max_new_tokens=2000):
|
|
173 |
|
174 |
|
175 |
|
176 |
-
|
177 |
-
title = "
|
178 |
-
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
shakespeare_interface = gr.Interface(generate_shakespeare_outputs,
|
182 |
-
inputs=[gr.Textbox(label="Enter any prompt ", type="text", value="
|
183 |
gr.Slider(minimum=100, maximum=5000, step=100, value=2000, label="Max new tokens")],
|
184 |
outputs=gr.Textbox(label="Output generated", type="text"), description=description1)
|
185 |
|
|
|
173 |
|
174 |
|
175 |
|
176 |
+
icon_html = '<i class="fas fa-chart-bar"></i>'
|
177 |
+
title = f"""
|
178 |
+
<div style="background-color: #f5f1f2; padding: 10px; display: flex; align-items: center;">
|
179 |
+
{icon_html} <span style="margin-left: 10px;">Nano GPT</span>
|
180 |
+
</div>
|
181 |
+
"""
|
182 |
+
description = f"""
|
183 |
+
<div style="background-color: #f1f1f5; padding: 10px; display: flex; align-items: center;">
|
184 |
+
{icon_html}
|
185 |
+
<span style="margin-left: 10px;">
|
186 |
+
<p><strong>Nano GPT trained on <a href='https://www.kaggle.com/datasets/mikeortman/wikipedia-sentences'>Shakespeare dataset</a>. It is trained on a very small amount of data to understand how GPT's are trained and built. The implementation can be found <a href='https://github.com/karpathy/nanoGPT'>here.</a>"</strong></p>
|
187 |
+
</span>
|
188 |
+
</div>
|
189 |
+
"""
|
190 |
|
191 |
shakespeare_interface = gr.Interface(generate_shakespeare_outputs,
|
192 |
+
inputs=[gr.Textbox(label="Enter any prompt ", type="text", value="Romeo"),
|
193 |
gr.Slider(minimum=100, maximum=5000, step=100, value=2000, label="Max new tokens")],
|
194 |
outputs=gr.Textbox(label="Output generated", type="text"), description=description1)
|
195 |
|