mboss commited on
Commit
408dce9
·
1 Parent(s): c4d073c

Spaces support

Browse files
Files changed (3) hide show
  1. README.md +1 -0
  2. gradio_demo.py +3 -0
  3. requirements.txt +2 -2
README.md CHANGED
@@ -5,6 +5,7 @@ colorFrom: indigo
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 5.32.1
 
8
  app_file: gradio_demo.py
9
  pinned: false
10
  ---
 
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 5.32.1
8
+ python_version: 3.10
9
  app_file: gradio_demo.py
10
  pinned: false
11
  ---
gradio_demo.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
  from PIL import Image
3
 
4
  from marble import (
@@ -28,6 +29,7 @@ EXAMPLE_IMAGES = {
28
  }
29
 
30
 
 
31
  def blend_images(target_image, texture1, texture2, edit_strength):
32
  """Blend between two texture images"""
33
  result = run_blend(
@@ -36,6 +38,7 @@ def blend_images(target_image, texture1, texture2, edit_strength):
36
  return result
37
 
38
 
 
39
  def parametric_control(
40
  target_image,
41
  texture_image,
 
1
  import gradio as gr
2
+ import spaces
3
  from PIL import Image
4
 
5
  from marble import (
 
29
  }
30
 
31
 
32
+ @spaces.GPU
33
  def blend_images(target_image, texture1, texture2, edit_strength):
34
  """Blend between two texture images"""
35
  result = run_blend(
 
38
  return result
39
 
40
 
41
+ @spaces.GPU
42
  def parametric_control(
43
  target_image,
44
  texture_image,
requirements.txt CHANGED
@@ -5,6 +5,6 @@ transformers==4.27.4
5
  opencv-python==4.7.0.68
6
  accelerate==0.26.1
7
  timm==0.6.12
8
- torch==2.3.0
9
- torchvision==0.18.0
10
  numpy==1.26.4
 
5
  opencv-python==4.7.0.68
6
  accelerate==0.26.1
7
  timm==0.6.12
8
+ torch==2.4.0
9
+ torchvision==0.19.0
10
  numpy==1.26.4