carpedm20 commited on
Commit
2f05cc7
·
verified ·
1 Parent(s): 3dc508a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -40
app.py CHANGED
@@ -108,49 +108,10 @@ class GradioInterface:
108
  self.processor = ImageProcessor()
109
 
110
  def create(self):
111
- theme = gr.themes.Soft(
112
- primary_hue="neutral",
113
- secondary_hue="slate",
114
- neutral_hue="zinc",
115
- radius_size=sizes.radius_md,
116
- text_size=sizes.text_md,
117
- ).set(
118
- body_background_fill="#1a1a1a",
119
- body_text_color="#fafafa",
120
- block_background_fill="#2a2a2a",
121
- block_border_color="#333",
122
- )
123
-
124
- css = """
125
- .app-header {
126
- padding: 24px;
127
- text-align: center;
128
- margin-bottom: 24px;
129
- }
130
- .app-title {
131
- font-size: 48px;
132
- font-weight: 700;
133
- }
134
- .app-subtitle {
135
- font-size: 24px;
136
- opacity: 0.9;
137
- }
138
- """
139
-
140
- header = """
141
- <div class="app-header">
142
- <h1 class="app-title">Sapiens Body-Part Segmentation</h1>
143
- <h2 class="app-subtitle">ECCV 2024 (Oral)</h2>
144
- <p>Foundation model fine-tuned for dense human part segmentation.</p>
145
- </div>
146
- """
147
-
148
  def run(image, model):
149
  return self.processor.process(image, model)
150
 
151
- with gr.Blocks(theme=theme, css=css) as demo:
152
- gr.HTML(header)
153
-
154
  with gr.Row():
155
  with gr.Column(scale=1):
156
  input_image = gr.Image(
@@ -199,3 +160,4 @@ def main():
199
 
200
  if __name__ == "__main__":
201
  main()
 
 
108
  self.processor = ImageProcessor()
109
 
110
  def create(self):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  def run(image, model):
112
  return self.processor.process(image, model)
113
 
114
+ with gr.Blocks() as demo:
 
 
115
  with gr.Row():
116
  with gr.Column(scale=1):
117
  input_image = gr.Image(
 
160
 
161
  if __name__ == "__main__":
162
  main()
163
+