Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,24 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
def generate_video(image, prompt):
|
| 8 |
-
# هنا بنقول للمحرك خد الصورة وحركها
|
| 9 |
-
# ملاحظة: الموديلات المجانية أحياناً بتاخد وقت في الزحمة
|
| 10 |
-
return "جاري الاتصال بالمحرك العالمي لتحريك صورتك.. انتظر قليلاً"
|
| 11 |
-
|
| 12 |
-
with gr.Blocks() as demo:
|
| 13 |
-
gr.HTML("<h1 style='text-align:center;'>ANAS AI 🚀</h1>")
|
| 14 |
-
with gr.Row():
|
| 15 |
-
with gr.Column():
|
| 16 |
-
img_input = gr.Image(type="filepath", label="ارفع صورتك")
|
| 17 |
-
prompt_input = gr.Textbox(label="وصف الحركة")
|
| 18 |
-
run_btn = gr.Button("تحريك الصورة الآن 🎬")
|
| 19 |
-
with gr.Column():
|
| 20 |
-
video_output = gr.Video(label="الفيديو الناتج")
|
| 21 |
-
|
| 22 |
-
run_btn.click(generate_video, [img_input, prompt_input], video_output)
|
| 23 |
|
| 24 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
+
# هنا بنسحب موديل تحريك صور جاهز وشغال (زي المحرك الخارجي)
|
| 4 |
+
demo = gr.load("models/vdo/Stable-Video-Diffusion-Img2Vid")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
demo.launch()
|