Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ from PIL import Image
|
|
11 |
logging.basicConfig(level=logging.INFO)
|
12 |
|
13 |
# API ํด๋ผ์ด์ธํธ ์ค์
|
|
|
14 |
api_client = Client("http://211.233.58.202:7960/")
|
15 |
|
16 |
# ๊ฐค๋ฌ๋ฆฌ ์ ์ฅ ๋๋ ํ ๋ฆฌ ์ค์
|
@@ -56,6 +57,7 @@ def load_gallery():
|
|
56 |
return []
|
57 |
|
58 |
|
|
|
59 |
def respond(image, prompt, steps, cfg_scale, eta, fs, seed, video_length):
|
60 |
logging.info(f"Received prompt: {prompt}, steps: {steps}, cfg_scale: {cfg_scale}, "
|
61 |
f"eta: {eta}, fs: {fs}, seed: {seed}, video_length: {video_length}")
|
@@ -72,14 +74,14 @@ def respond(image, prompt, steps, cfg_scale, eta, fs, seed, video_length):
|
|
72 |
|
73 |
# ๋น๋์ค ์์ฑ ์์ฒญ
|
74 |
result = api_client.predict(
|
75 |
-
|
76 |
-
prompt
|
77 |
-
steps
|
78 |
-
cfg_scale
|
79 |
-
eta
|
80 |
-
fs
|
81 |
-
seed
|
82 |
-
video_length
|
83 |
api_name="/infer"
|
84 |
)
|
85 |
logging.info("API response received: %s", result)
|
@@ -116,7 +118,7 @@ def use_prompt(prompt):
|
|
116 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
117 |
with gr.Tab("Generate"):
|
118 |
with gr.Row():
|
119 |
-
input_image = gr.Image(label="Upload an image")
|
120 |
input_text = gr.Textbox(label="Enter your prompt for video generation")
|
121 |
output_video = gr.Video(label="Generated Video")
|
122 |
|
|
|
11 |
logging.basicConfig(level=logging.INFO)
|
12 |
|
13 |
# API ํด๋ผ์ด์ธํธ ์ค์
|
14 |
+
|
15 |
api_client = Client("http://211.233.58.202:7960/")
|
16 |
|
17 |
# ๊ฐค๋ฌ๋ฆฌ ์ ์ฅ ๋๋ ํ ๋ฆฌ ์ค์
|
|
|
57 |
return []
|
58 |
|
59 |
|
60 |
+
|
61 |
def respond(image, prompt, steps, cfg_scale, eta, fs, seed, video_length):
|
62 |
logging.info(f"Received prompt: {prompt}, steps: {steps}, cfg_scale: {cfg_scale}, "
|
63 |
f"eta: {eta}, fs: {fs}, seed: {seed}, video_length: {video_length}")
|
|
|
74 |
|
75 |
# ๋น๋์ค ์์ฑ ์์ฒญ
|
76 |
result = api_client.predict(
|
77 |
+
temp_file_path, # ์ง์ ํ์ผ ๊ฒฝ๋ก ์ ๋ฌ
|
78 |
+
prompt,
|
79 |
+
steps,
|
80 |
+
cfg_scale,
|
81 |
+
eta,
|
82 |
+
fs,
|
83 |
+
seed,
|
84 |
+
video_length,
|
85 |
api_name="/infer"
|
86 |
)
|
87 |
logging.info("API response received: %s", result)
|
|
|
118 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
119 |
with gr.Tab("Generate"):
|
120 |
with gr.Row():
|
121 |
+
input_image = gr.Image(label="Upload an image", type="filepath")
|
122 |
input_text = gr.Textbox(label="Enter your prompt for video generation")
|
123 |
output_video = gr.Video(label="Generated Video")
|
124 |
|