kavehtaheri commited on
Commit
e7ed8ea
·
verified ·
1 Parent(s): 5b7e63c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -13,14 +13,7 @@ import json
13
  import easyocr
14
  import requests
15
  import io
16
- import json
17
-
18
- original_dumps = json.dumps
19
- def custom_dumps(*args, **kwargs):
20
- kwargs['ensure_ascii'] = False
21
- return original_dumps(*args, **kwargs)
22
 
23
- json.dumps = custom_dumps
24
  # --- CONFIGURATION ---
25
  API_KEY = os.getenv("GEMINI_API_KEY", "AIzaSyCu-tb3BRDIJjUt6G5ccWmrR51tOY0VZd4") # Replace with your actual API key or use os.getenv
26
  ONE_API_KEY = os.getenv("ONE_API_KEY", "268976:66f4f58a2a905") # Key for the Instagram download service
@@ -50,7 +43,7 @@ def analyze_and_transcreate_with_gemini(video_path: str, english_caption: str, p
50
 
51
  try:
52
  genai.configure(api_key=API_KEY)
53
- model = genai.GenerativeModel('gemini-1.5-flash')
54
 
55
  progress(0.2, desc="[1/4] Performing deep analysis & transcreation with Gemini...")
56
 
 
13
  import easyocr
14
  import requests
15
  import io
 
 
 
 
 
 
16
 
 
17
  # --- CONFIGURATION ---
18
  API_KEY = os.getenv("GEMINI_API_KEY", "AIzaSyCu-tb3BRDIJjUt6G5ccWmrR51tOY0VZd4") # Replace with your actual API key or use os.getenv
19
  ONE_API_KEY = os.getenv("ONE_API_KEY", "268976:66f4f58a2a905") # Key for the Instagram download service
 
43
 
44
  try:
45
  genai.configure(api_key=API_KEY)
46
+ model = genai.GenerativeModel('gemini-2.5-flash')
47
 
48
  progress(0.2, desc="[1/4] Performing deep analysis & transcreation with Gemini...")
49