amankishore commited on
Commit
0016575
1 Parent(s): 4e3f695

Readme and Cleanup

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +16 -1
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
- title: Sjc
3
- emoji: 💻
4
  colorFrom: red
5
  colorTo: pink
6
  sdk: gradio
 
1
  ---
2
+ title: Score Jacobian Chaining
3
+ emoji: 🧊
4
  colorFrom: red
5
  colorTo: pink
6
  sdk: gradio
app.py CHANGED
@@ -29,10 +29,25 @@ def vis_routine(y, depth):
29
  depth = depth.cpu().numpy()
30
  return pane, im, depth
31
 
32
- with gr.Blocks(css=".gradio-container {max-width: 512px; margin: auto;}") as demo:
 
 
 
 
 
 
 
33
  # title
34
  gr.Markdown('[Score Jacobian Chaining](https://github.com/pals-ttic/sjc): Lifting Pretrained 2D Diffusion Models for 3D Generation')
35
 
 
 
 
 
 
 
 
 
36
  # inputs
37
  prompt = gr.Textbox(label="Prompt", max_lines=1, value="A high quality photo of a delicious burger")
38
  iters = gr.Slider(label="Iters", minimum=100, maximum=20000, value=10000, step=100)
 
29
  depth = depth.cpu().numpy()
30
  return pane, im, depth
31
 
32
+ css = '''
33
+ .instruction{position: absolute; top: 0;right: 0;margin-top: 0px !important}
34
+ .arrow{position: absolute;top: 0;right: -110px;margin-top: -8px !important}
35
+ #component-4, #component-3, #component-10{min-height: 0}
36
+ .duplicate-button img{margin: 0}
37
+ '''
38
+
39
+ with gr.Blocks(css=css) as demo:
40
  # title
41
  gr.Markdown('[Score Jacobian Chaining](https://github.com/pals-ttic/sjc): Lifting Pretrained 2D Diffusion Models for 3D Generation')
42
 
43
+ gr.HTML(f'''
44
+ <div class="gr-prose" style="max-width: 80%">
45
+ <h2>Attention - This Space takes over 30min to run!</h2>
46
+ <p>If the Queue is too long you can run locally or duplicate the Space and run it on your own profile using a (paid) private T4 GPU for training. As each T4 costs US$0.60/h, it should cost < US$1 to train most models using default settings!&nbsp;&nbsp;<a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/MirageML/sjc?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>
47
+ <img class="instruction" src="file/duplicate.png">
48
+ <img class="arrow" src="file/arrow.png" />
49
+ </div>
50
+ ''')
51
  # inputs
52
  prompt = gr.Textbox(label="Prompt", max_lines=1, value="A high quality photo of a delicious burger")
53
  iters = gr.Slider(label="Iters", minimum=100, maximum=20000, value=10000, step=100)