anjikum commited on
Commit
2391cc3
·
verified ·
1 Parent(s): 3499204

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -1
app.py CHANGED
@@ -245,7 +245,39 @@ iface = gr.Interface(
245
  ],
246
  outputs=gr.Textbox(label="Generated Text"),
247
  title="SmolLM2 Text Generation",
248
- description="Generate text using the SmolLM2 model"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  )
250
 
251
  if __name__ == "__main__":
 
245
  ],
246
  outputs=gr.Textbox(label="Generated Text"),
247
  title="SmolLM2 Text Generation",
248
+ description="Generate Shakespeare-style text using the SmolLM2 model",
249
+ examples=[
250
+ ["To be, or not to be:", 50, 0.7, 50],
251
+ ["O Romeo, Romeo,", 40, 0.8, 40],
252
+ ["All the world's a stage,", 60, 0.9, 45],
253
+ ["Friends, Romans, countrymen,", 45, 0.7, 50],
254
+ ["Now is the winter of", 55, 0.8, 40],
255
+ ["If music be the food of love,", 50, 0.9, 45],
256
+ ],
257
+ article="""
258
+ ### Example Prompts:
259
+
260
+ 1. **Hamlet's Soliloquy Style**:
261
+ - "To be, or not to be:"
262
+ - "What dreams may come when"
263
+
264
+ 2. **Romeo and Juliet Style**:
265
+ - "O Romeo, Romeo,"
266
+ - "But soft, what light"
267
+
268
+ 3. **Macbeth Style**:
269
+ - "Double, double toil and"
270
+ - "Is this a dagger which"
271
+
272
+ 4. **Sonnets Style**:
273
+ - "Shall I compare thee to"
274
+ - "When in disgrace with fortune"
275
+
276
+ ### Tips:
277
+ - Use higher temperature (0.8-0.9) for more creative outputs
278
+ - Use lower temperature (0.6-0.7) for more focused text
279
+ - Adjust max length based on your needs (20-100 tokens)
280
+ """
281
  )
282
 
283
  if __name__ == "__main__":