Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1945,14 +1945,17 @@ def download_novel(novel_text: str, format: str, language: str, session_id: str
|
|
1945 |
stages = NovelDatabase.get_stages(session_id)
|
1946 |
logger.info(f"Found {len(stages)} stages in database")
|
1947 |
|
1948 |
-
# 테스트 모드 감지 -
|
1949 |
is_test_mode = False
|
1950 |
-
|
|
|
1951 |
has_writer3 = any(stage['role'] == 'writer3' for stage in stages)
|
1952 |
-
|
|
|
1953 |
is_test_mode = True
|
1954 |
-
logger.info("Test mode detected -
|
1955 |
|
|
|
1956 |
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
1957 |
|
1958 |
if format == "DOCX" and DOCX_AVAILABLE:
|
|
|
1945 |
stages = NovelDatabase.get_stages(session_id)
|
1946 |
logger.info(f"Found {len(stages)} stages in database")
|
1947 |
|
1948 |
+
# 테스트 모드 감지 - writer10이 있으면 테스트 모드
|
1949 |
is_test_mode = False
|
1950 |
+
has_writer10 = any(stage['role'] == 'writer10' for stage in stages)
|
1951 |
+
has_writer1 = any(stage['role'] == 'writer1' for stage in stages)
|
1952 |
has_writer3 = any(stage['role'] == 'writer3' for stage in stages)
|
1953 |
+
|
1954 |
+
if has_writer10 and has_writer1 and not has_writer3:
|
1955 |
is_test_mode = True
|
1956 |
+
logger.info("Test mode detected - writer1 + writer10 mode")
|
1957 |
|
1958 |
+
|
1959 |
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
1960 |
|
1961 |
if format == "DOCX" and DOCX_AVAILABLE:
|