seawolf2357 commited on
Commit
dae1a6f
ยท
verified ยท
1 Parent(s): 51c1540

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -27
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()