Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -7,32 +7,6 @@ END_GENERATE = '/generate'
|
|
7 |
END_STATUS = '/generate/status'
|
8 |
API_KEY = 'ZZUIQ4OZASNRQ8B8WYHNW'
|
9 |
|
10 |
-
def set_header():
|
11 |
-
header = {
|
12 |
-
"Content-Type": "application/json",
|
13 |
-
"Authorization": "Bearer " + API_KEY,
|
14 |
-
}
|
15 |
-
return header
|
16 |
-
|
17 |
-
# ๋น๋์ค ๋๋ ์ค๋์ค ์ปจํ
์ธ ์์ฑํ๋ ํจ์
|
18 |
-
def generate_contents(user_content, brand_name, aspect_ratio='landscape'):
|
19 |
-
url = API_HOME + END_GENERATE
|
20 |
-
VOICE_ID = '64ea1fbc310bccff6a4191ed' # Korean, Korea, Wolf Sea
|
21 |
-
|
22 |
-
# ๋ฉํฐ ๋ผ์ธ ํ
์คํธ๋ฅผ ๋ถ๋ฆฌํ์ฌ ๊ฐ ์ค์ ๋ณ๋์ ์ฌ์ผ๋ก ์ฒ๋ฆฌ
|
23 |
-
scenes = [{"content": line.strip(), "voiceId": VOICE_ID} for line in user_content.split('\n') if line.strip()]
|
24 |
-
|
25 |
-
payload = {
|
26 |
-
"format": "video", # video | audio
|
27 |
-
"scenes": sceneimport gradio as gr
|
28 |
-
import requests
|
29 |
-
import time
|
30 |
-
|
31 |
-
API_HOME = 'https://api.fliki.ai/v1'
|
32 |
-
END_GENERATE = '/generate'
|
33 |
-
END_STATUS = '/generate/status'
|
34 |
-
API_KEY = 'ZZUIQ4OZASNRQ8B8WYHNW'
|
35 |
-
|
36 |
def set_header():
|
37 |
header = {
|
38 |
"Content-Type": "application/json",
|
@@ -147,4 +121,4 @@ iface_status = gr.Interface(
|
|
147 |
|
148 |
# ๋ ์ธํฐํ์ด์ค๋ฅผ ํญ์ผ๋ก ๊ตฌ์ฑ
|
149 |
iface_combined = gr.TabbedInterface([iface_create, iface_status], ["์ปจํ
์ธ ์์ฑ", "์ํ ํ์ธ ๋ฐ ๋ค์ด๋ก๋"])
|
150 |
-
iface_combined.launch()
|
|
|
7 |
END_STATUS = '/generate/status'
|
8 |
API_KEY = 'ZZUIQ4OZASNRQ8B8WYHNW'
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
def set_header():
|
11 |
header = {
|
12 |
"Content-Type": "application/json",
|
|
|
121 |
|
122 |
# ๋ ์ธํฐํ์ด์ค๋ฅผ ํญ์ผ๋ก ๊ตฌ์ฑ
|
123 |
iface_combined = gr.TabbedInterface([iface_create, iface_status], ["์ปจํ
์ธ ์์ฑ", "์ํ ํ์ธ ๋ฐ ๋ค์ด๋ก๋"])
|
124 |
+
iface_combined.launch()
|