Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import warnings
|
|
| 6 |
warnings.filterwarnings('ignore')
|
| 7 |
|
| 8 |
api_key = os.getenv("api_key")
|
| 9 |
-
|
| 10 |
model='gemini/gemini-1.5-flash',
|
| 11 |
api_key=api_key
|
| 12 |
)
|
|
@@ -264,6 +264,15 @@ def create_gradio_app():
|
|
| 264 |
.gradio-button:hover {
|
| 265 |
background-color: #45a049;
|
| 266 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
""") as demo:
|
| 268 |
gr.Markdown("<div class='main-title'>Fantasy Novel Outline Generator</div>")
|
| 269 |
gr.Markdown("<div class='sub-title'>Turn your novel idea into a rich, detailed outline with AI-powered agents.</div>")
|
|
@@ -280,9 +289,9 @@ def create_gradio_app():
|
|
| 280 |
generate_btn = gr.Button("Generate Outline", elem_classes="gradio-button")
|
| 281 |
|
| 282 |
with gr.Column(scale=2):
|
| 283 |
-
output_html = gr.HTML(label="AI-Generated Outline")
|
| 284 |
|
| 285 |
-
# Button logic
|
| 286 |
generate_btn.click(
|
| 287 |
fn=lambda idea: format_output(generate_fantasy_outline(idea)),
|
| 288 |
inputs=[user_idea],
|
|
@@ -291,4 +300,5 @@ def create_gradio_app():
|
|
| 291 |
|
| 292 |
demo.launch()
|
| 293 |
|
|
|
|
| 294 |
create_gradio_app()
|
|
|
|
| 6 |
warnings.filterwarnings('ignore')
|
| 7 |
|
| 8 |
api_key = os.getenv("api_key")
|
| 9 |
+
llm = LLM(
|
| 10 |
model='gemini/gemini-1.5-flash',
|
| 11 |
api_key=api_key
|
| 12 |
)
|
|
|
|
| 264 |
.gradio-button:hover {
|
| 265 |
background-color: #45a049;
|
| 266 |
}
|
| 267 |
+
#output-box {
|
| 268 |
+
height: 600px;
|
| 269 |
+
overflow-y: scroll;
|
| 270 |
+
padding: 20px;
|
| 271 |
+
background-color: white;
|
| 272 |
+
border: 1px solid #ccc;
|
| 273 |
+
border-radius: 12px;
|
| 274 |
+
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
|
| 275 |
+
}
|
| 276 |
""") as demo:
|
| 277 |
gr.Markdown("<div class='main-title'>Fantasy Novel Outline Generator</div>")
|
| 278 |
gr.Markdown("<div class='sub-title'>Turn your novel idea into a rich, detailed outline with AI-powered agents.</div>")
|
|
|
|
| 289 |
generate_btn = gr.Button("Generate Outline", elem_classes="gradio-button")
|
| 290 |
|
| 291 |
with gr.Column(scale=2):
|
| 292 |
+
output_html = gr.HTML(label="AI-Generated Outline", elem_id="output-box")
|
| 293 |
|
| 294 |
+
# Button logic
|
| 295 |
generate_btn.click(
|
| 296 |
fn=lambda idea: format_output(generate_fantasy_outline(idea)),
|
| 297 |
inputs=[user_idea],
|
|
|
|
| 300 |
|
| 301 |
demo.launch()
|
| 302 |
|
| 303 |
+
|
| 304 |
create_gradio_app()
|