agentsvalley commited on
Commit
e47eb38
·
verified ·
1 Parent(s): 4abb8f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -13
app.py CHANGED
@@ -37,10 +37,6 @@ body {
37
  max-width: 600px;
38
  margin: auto;
39
  }
40
- .gradio-container .wrap .text-gray-700 {
41
- color: white !important;
42
- }
43
-
44
  button {
45
  background: linear-gradient(135deg, #ff416c, #ff4b4b);
46
  color: white;
@@ -66,14 +62,13 @@ input, textarea {
66
  }
67
  """
68
 
69
- demo = gr.Interface(
70
- fn=generate_image,
71
- inputs=gr.Textbox(label="Enter your prompt", value="A robot on a stallion."),
72
- outputs=gr.Image(label="Generated Image by Agents Valley"),
73
- title="🚀 Agents Valley AI Image Generator",
74
- description="<span style='color: white;'>Enter a description and generate an AI image powered by Agents Valley!</span>",
75
- theme=None,
76
- css=css
77
- )
78
 
79
  demo.launch()
 
37
  max-width: 600px;
38
  margin: auto;
39
  }
 
 
 
 
40
  button {
41
  background: linear-gradient(135deg, #ff416c, #ff4b4b);
42
  color: white;
 
62
  }
63
  """
64
 
65
+ with gr.Blocks(css=css) as demo:
66
+ gr.Markdown(
67
+ "<h2 style='color: white; font-size: 18px; font-weight: 500;'>Enter a description and generate an AI image powered by Agents Valley!</h2>"
68
+ )
69
+ prompt_input = gr.Textbox(label="Enter your prompt", value="A robot on a stallion.")
70
+ output_image = gr.Image(label="Generated Image by Agents Valley")
71
+ generate_button = gr.Button("Generate Image")
72
+ generate_button.click(fn=generate_image, inputs=prompt_input, outputs=output_image)
 
73
 
74
  demo.launch()