fffiloni commited on
Commit
e2dbb16
1 Parent(s): ef1e1b7

get rid of js share button

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -1,5 +1,4 @@
1
  import gradio as gr
2
- from share_btn import community_icon_html, loading_icon_html, share_js
3
  import torch
4
  from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
5
  from diffusers.utils import export_to_video
@@ -13,7 +12,7 @@ def infer(prompt):
13
  video_frames = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=40, height=320, width=576, num_frames=24).frames
14
  video_path = export_to_video(video_frames)
15
  print(video_path)
16
- return video_path, gr.Group.update(visible=True)
17
 
18
  css = """
19
  #col-container {max-width: 510px; margin-left: auto; margin-right: auto;}
@@ -126,11 +125,6 @@ with gr.Blocks(css=css) as demo:
126
  video_result = gr.Video(label="Video Output", elem_id="video-output")
127
 
128
  with gr.Row():
129
- with gr.Group(elem_id="share-btn-container", visible=False) as share_group:
130
- community_icon = gr.HTML(community_icon_html)
131
- loading_icon = gr.HTML(loading_icon_html)
132
- share_button = gr.Button("Share with Community", elem_id="share-btn")
133
-
134
  gr.Markdown("""
135
  [![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-lg.svg#center)](https://huggingface.co/spaces/fffiloni/zeroscope-cloning?duplicate=true)
136
  """)
@@ -156,10 +150,8 @@ with gr.Blocks(css=css) as demo:
156
 
157
  submit_btn.click(fn=infer,
158
  inputs=[prompt_in],
159
- outputs=[video_result, share_group],
160
  api_name="zrscp")
161
-
162
- share_button.click(None, [], [], _js=share_js)
163
 
164
  demo.queue(max_size=12).launch(show_api=False)
165
 
 
1
  import gradio as gr
 
2
  import torch
3
  from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
4
  from diffusers.utils import export_to_video
 
12
  video_frames = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=40, height=320, width=576, num_frames=24).frames
13
  video_path = export_to_video(video_frames)
14
  print(video_path)
15
+ return video_path
16
 
17
  css = """
18
  #col-container {max-width: 510px; margin-left: auto; margin-right: auto;}
 
125
  video_result = gr.Video(label="Video Output", elem_id="video-output")
126
 
127
  with gr.Row():
 
 
 
 
 
128
  gr.Markdown("""
129
  [![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-lg.svg#center)](https://huggingface.co/spaces/fffiloni/zeroscope-cloning?duplicate=true)
130
  """)
 
150
 
151
  submit_btn.click(fn=infer,
152
  inputs=[prompt_in],
153
+ outputs=[video_result],
154
  api_name="zrscp")
 
 
155
 
156
  demo.queue(max_size=12).launch(show_api=False)
157