Muhammad Taqi Raza
commited on
Commit
Β·
bd5b7d4
1
Parent(s):
14629ad
gradio
Browse files- gradio_app.py +1 -14
gradio_app.py
CHANGED
@@ -36,11 +36,6 @@ def download_models():
|
|
36 |
else:
|
37 |
print("β
Pretrained models already exist.")
|
38 |
|
39 |
-
|
40 |
-
@spaces.GPU
|
41 |
-
def warmup():
|
42 |
-
import torch
|
43 |
-
return {"cuda_available": torch.cuda.is_available()}
|
44 |
# -----------------------------
|
45 |
# Step 1: Get Anchor Video
|
46 |
# -----------------------------
|
@@ -167,11 +162,6 @@ demo = gr.Blocks()
|
|
167 |
|
168 |
with demo:
|
169 |
|
170 |
-
with gr.Row():
|
171 |
-
model_download_output = gr.Textbox(label="π Model Download Log", lines=2)
|
172 |
-
model_download_button = gr.Button("π¦ Download Pretrained Models")
|
173 |
-
model_download_button.click(fn=download_models, outputs=model_download_output)
|
174 |
-
|
175 |
gr.Markdown("## π¬ EPiC: Cinematic Camera Control")
|
176 |
|
177 |
with gr.Tabs():
|
@@ -267,8 +257,5 @@ with demo:
|
|
267 |
outputs=[step2_video, step2_logs]
|
268 |
)
|
269 |
if __name__ == "__main__":
|
270 |
-
|
271 |
-
warmup() # will quietly trigger ZeroGPU once
|
272 |
-
except Exception as e:
|
273 |
-
print(f"Warmup failed: {e}")
|
274 |
demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False)
|
|
|
36 |
else:
|
37 |
print("β
Pretrained models already exist.")
|
38 |
|
|
|
|
|
|
|
|
|
|
|
39 |
# -----------------------------
|
40 |
# Step 1: Get Anchor Video
|
41 |
# -----------------------------
|
|
|
162 |
|
163 |
with demo:
|
164 |
|
|
|
|
|
|
|
|
|
|
|
165 |
gr.Markdown("## π¬ EPiC: Cinematic Camera Control")
|
166 |
|
167 |
with gr.Tabs():
|
|
|
257 |
outputs=[step2_video, step2_logs]
|
258 |
)
|
259 |
if __name__ == "__main__":
|
260 |
+
download_models()
|
|
|
|
|
|
|
261 |
demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False)
|