Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ import gc
|
|
22 |
from openai import OpenAI
|
23 |
|
24 |
# Load Hugging Face token if needed
|
25 |
-
hf_token = os.getenv("HF_TOKEN")
|
26 |
openai_api_key = os.getenv("OPENAI_API_KEY")
|
27 |
client = OpenAI(api_key=openai_api_key)
|
28 |
system_prompt_t2v_path = "assets/system_prompt_t2v.txt"
|
@@ -37,7 +37,7 @@ with open(system_prompt_i2v_path, "r") as f:
|
|
37 |
model_path = "asset"
|
38 |
if not os.path.exists(model_path):
|
39 |
snapshot_download(
|
40 |
-
"Lightricks/LTX-Video", local_dir=model_path, repo_type="model", token=hf_token
|
41 |
)
|
42 |
|
43 |
# Global variables to load components
|
@@ -114,7 +114,8 @@ def enhance_prompt_if_enabled(prompt, enhance_toggle, type="t2v"):
|
|
114 |
|
115 |
try:
|
116 |
response = client.chat.completions.create(
|
117 |
-
model="gpt-4o-mini",
|
|
|
118 |
messages=messages,
|
119 |
max_tokens=200,
|
120 |
)
|
|
|
22 |
from openai import OpenAI
|
23 |
|
24 |
# Load Hugging Face token if needed
|
25 |
+
#hf_token = os.getenv("HF_TOKEN")
|
26 |
openai_api_key = os.getenv("OPENAI_API_KEY")
|
27 |
client = OpenAI(api_key=openai_api_key)
|
28 |
system_prompt_t2v_path = "assets/system_prompt_t2v.txt"
|
|
|
37 |
model_path = "asset"
|
38 |
if not os.path.exists(model_path):
|
39 |
snapshot_download(
|
40 |
+
"Lightricks/LTX-Video", local_dir=model_path, repo_type="model", #token=hf_token
|
41 |
)
|
42 |
|
43 |
# Global variables to load components
|
|
|
114 |
|
115 |
try:
|
116 |
response = client.chat.completions.create(
|
117 |
+
#model="gpt-4o-mini",
|
118 |
+
model = "deepseek-chat",
|
119 |
messages=messages,
|
120 |
max_tokens=200,
|
121 |
)
|