multimodalart HF staff commited on
Commit
3c78fe0
·
1 Parent(s): 09b9aac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -121,6 +121,8 @@ def create_video(frames, fps):
121
 
122
 
123
  def infer(prompt,video_in, seed_in, trim_value):
 
 
124
  print(prompt)
125
  break_vid = get_frames(video_in)
126
 
@@ -196,14 +198,13 @@ article = """
196
 
197
  with gr.Blocks(css='style.css') as demo:
198
  if(is_shared_ui):
199
- top_description = gr.HTML(f'''
200
- <div class="gr-prose" style="max-width: 80%">
201
- <h2>Attention - This Space doesn't work in this shared UI</h2>
202
- <p>For it to work, you can either run locally or duplicate the Space and run it on your own profile using a (paid) private T4-small or A10G-small GPU for training. A T4 costs US$0.60/h, so it should cost < US$1 to train most models using default settings with it!&nbsp;&nbsp;<a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}?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>
203
- <img class="instruction" src="file=duplicate.png">
204
- <img class="arrow" src="file=arrow.png" />
205
- </div>
206
- ''')
207
  with gr.Column(elem_id="col-container"):
208
  gr.HTML(title)
209
  with gr.Row():
 
121
 
122
 
123
  def infer(prompt,video_in, seed_in, trim_value):
124
+ if(is_shared_ui):
125
+ raise gr.Error("This Space doesn't work on this shared UI.")
126
  print(prompt)
127
  break_vid = get_frames(video_in)
128
 
 
198
 
199
  with gr.Blocks(css='style.css') as demo:
200
  if(is_shared_ui):
201
+ with gr.Box():
202
+ top_description = gr.HTML(f'''
203
+ <div class="gr-prose" style="max-width: 80%">
204
+ <h2>Attention - This Space doesn't work in this shared UI</h2>
205
+ <p>For it to work, you can access the [original](https://huggingface.co/spaces/fffiloni/Pix2Pix-Video) or duplicate this Space and run it on your own profile using a GPU.&nbsp;&nbsp;<a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}?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>
206
+ </div>
207
+ ''')
 
208
  with gr.Column(elem_id="col-container"):
209
  gr.HTML(title)
210
  with gr.Row():