Spaces:
Sleeping
Sleeping
Commit
·
b352838
1
Parent(s):
ec21036
"L"
Browse files
main.py
CHANGED
@@ -3,7 +3,17 @@ from src.text_to_speech import text_to_speech
|
|
3 |
from src.image_gen import image_gen
|
4 |
from src.text_to_video import text_to_video
|
5 |
import os
|
|
|
|
|
6 |
def main(file_path, analysis_level='basic', writting_style='academic', word_lower_limit=100, word_upper_limit = 150, gender = "female", speed = "fast", number_of_images = 3, detail_level="short", perspective="neutral", emotion="sad", time_setting="classic", art_style="realistic", style="anime", color_palette="monochrome"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
text_processing(file_path = file_path, analysis_level=analysis_level, writting_style=writting_style, word_lower_limit = word_lower_limit, word_upper_limit=word_upper_limit )
|
8 |
text_to_speech(gender = gender, speed = speed)
|
9 |
image_gen(number_of_images = number_of_images, detail_level=detail_level, perspective=perspective, emotion=emotion, time_setting=time_setting, art_style=art_style, style=style, color_palette=color_palette)
|
|
|
3 |
from src.image_gen import image_gen
|
4 |
from src.text_to_video import text_to_video
|
5 |
import os
|
6 |
+
import glob
|
7 |
+
|
8 |
def main(file_path, analysis_level='basic', writting_style='academic', word_lower_limit=100, word_upper_limit = 150, gender = "female", speed = "fast", number_of_images = 3, detail_level="short", perspective="neutral", emotion="sad", time_setting="classic", art_style="realistic", style="anime", color_palette="monochrome"):
|
9 |
+
# Lấy danh sách tất cả các tệp .txt và .mp3 trong thư mục hiện tại
|
10 |
+
files_to_delete = glob.glob("*.txt") + glob.glob("*.mp3")
|
11 |
+
|
12 |
+
# Xóa tất cả các tệp trừ "requirements.txt"
|
13 |
+
for file in files_to_delete:
|
14 |
+
if file != "requirements.txt":
|
15 |
+
os.remove(file)
|
16 |
+
print(f"Deleted: {file}")
|
17 |
text_processing(file_path = file_path, analysis_level=analysis_level, writting_style=writting_style, word_lower_limit = word_lower_limit, word_upper_limit=word_upper_limit )
|
18 |
text_to_speech(gender = gender, speed = speed)
|
19 |
image_gen(number_of_images = number_of_images, detail_level=detail_level, perspective=perspective, emotion=emotion, time_setting=time_setting, art_style=art_style, style=style, color_palette=color_palette)
|