Nior18867 commited on
Commit
6f02bc5
·
verified ·
1 Parent(s): 293929d

Fix: python:3.10 + gradio 6.x pinned deps

Browse files
Files changed (4) hide show
  1. Dockerfile +14 -13
  2. README.md +10 -10
  3. app.py +4 -6
  4. requirements.txt +8 -0
Dockerfile CHANGED
@@ -1,13 +1,14 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /app
4
-
5
- RUN pip install --no-cache-dir gradio==3.50.2 requests>=2.28.0
6
-
7
- COPY app.py .
8
-
9
- EXPOSE 7860
10
- ENV GRADIO_SERVER_NAME="0.0.0.0"
11
- ENV GRADIO_SERVER_PORT="7860"
12
-
13
- CMD ["python", "app.py"]
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
+
8
+ COPY app.py .
9
+
10
+ EXPOSE 7860
11
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
12
+ ENV GRADIO_SERVER_PORT="7860"
13
+
14
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -1,10 +1,10 @@
1
- ---
2
- title: Image Expand
3
- emoji: 🖼️
4
- colorFrom: blue
5
- colorTo: purple
6
- sdk: docker
7
- pinned: false
8
- license: mit
9
- short_description: AI-powered image expansion
10
- ---
 
1
+ ---
2
+ title: Image Expand
3
+ emoji: 🖼️
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ license: mit
9
+ short_description: AI-powered image expansion
10
+ ---
app.py CHANGED
@@ -15,8 +15,6 @@ MODEL_ENDPOINT = "bria/expand"
15
  POLL_INTERVAL = 1.5
16
  POLL_MAX_SECONDS = 120
17
 
18
-
19
-
20
  # ============ Aspect Ratios ============
21
  ASPECT_RATIOS = ["1:1", "3:2", "2:3", "4:3", "3:4", "16:9", "9:16"]
22
 
@@ -427,7 +425,7 @@ with gr.Blocks(css=CUSTOM_CSS, title="Image Expand - Bria AI x WaveSpeed") as de
427
  <div class="hero-badge">BRIA AI x WAVESPEED</div>
428
  <h1 class="hero-title">Image Expand</h1>
429
  <p class="hero-desc">
430
- Transform your images with AI-powered expansion. Intelligently extend any image to your desired aspect ratio. Try on <a href="https://wavespeed.ai/models?utm_source=huggingface_space_bria_expand" target="_blank" style="color: #8b5cf6; text-decoration: none; font-weight: 600;">wavespeed</a>
431
  </p>
432
  <div class="hero-badges">
433
  <span>
@@ -454,7 +452,7 @@ with gr.Blocks(css=CUSTOM_CSS, title="Image Expand - Bria AI x WaveSpeed") as de
454
  <svg width="20" height="20" fill="#8b5cf6" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z" clip-rule="evenodd"/></svg>
455
  API Key
456
  </span>
457
- <a href="https://wavespeed.ai/models?utm_source=huggingface_space_bria_expand" target="_blank" class="get-key-btn">Get API Key</a>
458
  </div>
459
  """)
460
  api_key_input = gr.Textbox(
@@ -477,7 +475,7 @@ with gr.Blocks(css=CUSTOM_CSS, title="Image Expand - Bria AI x WaveSpeed") as de
477
  image_input = gr.Image(
478
  label="",
479
  type="filepath",
480
- source="upload",
481
  elem_classes=["hide-label", "upload-area"]
482
  )
483
  aspect_ratio_input = gr.Radio(
@@ -508,7 +506,7 @@ with gr.Blocks(css=CUSTOM_CSS, title="Image Expand - Bria AI x WaveSpeed") as de
508
  <div class="cta-container">
509
  <h3 class="cta-title">Want More Features?</h3>
510
  <p class="cta-desc">Higher resolutions, batch processing, and 700+ AI models</p>
511
- <a href="https://wavespeed.ai/models?utm_source=huggingface_space_bria_expand" target="_blank" class="cta-btn">
512
  Explore WaveSpeed.ai
513
  </a>
514
  </div>
 
15
  POLL_INTERVAL = 1.5
16
  POLL_MAX_SECONDS = 120
17
 
 
 
18
  # ============ Aspect Ratios ============
19
  ASPECT_RATIOS = ["1:1", "3:2", "2:3", "4:3", "3:4", "16:9", "9:16"]
20
 
 
425
  <div class="hero-badge">BRIA AI x WAVESPEED</div>
426
  <h1 class="hero-title">Image Expand</h1>
427
  <p class="hero-desc">
428
+ Transform your images with AI-powered expansion. Intelligently extend any image to your desired aspect ratio.
429
  </p>
430
  <div class="hero-badges">
431
  <span>
 
452
  <svg width="20" height="20" fill="#8b5cf6" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z" clip-rule="evenodd"/></svg>
453
  API Key
454
  </span>
455
+ <a href="https://wavespeed.ai/accesskey" target="_blank" class="get-key-btn">Get API Key</a>
456
  </div>
457
  """)
458
  api_key_input = gr.Textbox(
 
475
  image_input = gr.Image(
476
  label="",
477
  type="filepath",
478
+
479
  elem_classes=["hide-label", "upload-area"]
480
  )
481
  aspect_ratio_input = gr.Radio(
 
506
  <div class="cta-container">
507
  <h3 class="cta-title">Want More Features?</h3>
508
  <p class="cta-desc">Higher resolutions, batch processing, and 700+ AI models</p>
509
+ <a href="https://wavespeed.ai/models" target="_blank" class="cta-btn">
510
  Explore WaveSpeed.ai
511
  </a>
512
  </div>
requirements.txt CHANGED
@@ -1 +1,9 @@
 
 
 
 
 
 
 
1
  requests>=2.28.0
 
 
1
+ gradio>=6.0,<7.0
2
+ gradio_client>=2.0,<3.0
3
+ huggingface_hub>=1.0,<2.0
4
+ jinja2>=3.1,<4.0
5
+ starlette>=1.0,<2.0
6
+ fastapi>=0.115,<1.0
7
+ pydub>=0.25
8
  requests>=2.28.0
9
+ uvicorn>=0.30