Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,9 +82,16 @@ def respond(image, prompt, steps, cfg_scale, eta, fs, seed, video_length):
|
|
| 82 |
f"eta: {eta}, fs: {fs}, seed: {seed}, video_length: {video_length}")
|
| 83 |
|
| 84 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
# 비디오 생성 요청
|
| 86 |
result = api_client.predict(
|
| 87 |
-
|
| 88 |
prompt,
|
| 89 |
steps,
|
| 90 |
cfg_scale,
|
|
|
|
| 82 |
f"eta: {eta}, fs: {fs}, seed: {seed}, video_length: {video_length}")
|
| 83 |
|
| 84 |
try:
|
| 85 |
+
# 이미지 파일 처리
|
| 86 |
+
if image is not None:
|
| 87 |
+
with open(image, "rb") as f:
|
| 88 |
+
image_data = f.read()
|
| 89 |
+
else:
|
| 90 |
+
image_data = None
|
| 91 |
+
|
| 92 |
# 비디오 생성 요청
|
| 93 |
result = api_client.predict(
|
| 94 |
+
image_data, # 파일 데이터를 직접 전달
|
| 95 |
prompt,
|
| 96 |
steps,
|
| 97 |
cfg_scale,
|