Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,6 +22,15 @@ example_inputs = [
|
|
| 22 |
["Deep in the ocean, an underwater explorer encountered a mysterious and ancient creature.", 350]
|
| 23 |
]
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# Create a Gradio interface with examples and a word count slider
|
| 26 |
iface = gr.Interface(
|
| 27 |
fn=generate_story,
|
|
@@ -33,6 +42,7 @@ iface = gr.Interface(
|
|
| 33 |
title="Story Generator with Word Count",
|
| 34 |
description="Enter a prompt and select the word count to generate a story.",
|
| 35 |
examples=example_inputs,
|
|
|
|
| 36 |
)
|
| 37 |
|
| 38 |
# Launch the interface
|
|
|
|
| 22 |
["Deep in the ocean, an underwater explorer encountered a mysterious and ancient creature.", 350]
|
| 23 |
]
|
| 24 |
|
| 25 |
+
# Customization options
|
| 26 |
+
custom_style = {
|
| 27 |
+
"live": True, # Enables live updates
|
| 28 |
+
"textAreaBackgroundColor": "#f0f0f0", # Background color of the text input area
|
| 29 |
+
"textboxBorderColor": "#007ACC", # Border color of the text input box
|
| 30 |
+
"headerBackgroundColor": "#007ACC", # Background color of the header
|
| 31 |
+
"buttonColor": "#007ACC", # Color of the submission button
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
# Create a Gradio interface with examples and a word count slider
|
| 35 |
iface = gr.Interface(
|
| 36 |
fn=generate_story,
|
|
|
|
| 42 |
title="Story Generator with Word Count",
|
| 43 |
description="Enter a prompt and select the word count to generate a story.",
|
| 44 |
examples=example_inputs,
|
| 45 |
+
style=custom_style
|
| 46 |
)
|
| 47 |
|
| 48 |
# Launch the interface
|