Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -559,20 +559,22 @@ class ScreenplayGenerationSystem:
|
|
| 559 |
yield buffer
|
| 560 |
buffer = ""
|
| 561 |
|
|
|
|
|
|
|
| 562 |
except Exception as e:
|
| 563 |
logger.error(f"Line processing error: {e}")
|
| 564 |
continue
|
| 565 |
|
| 566 |
# 남은 버퍼 처리
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
|
| 577 |
def generate_planning(self, query: str, screenplay_type: str, genre: str) -> Generator[Tuple[str, float, Dict, List, str], None, None]:
|
| 578 |
"""기획안 생성 with 다이어그램"""
|
|
|
|
| 559 |
yield buffer
|
| 560 |
buffer = ""
|
| 561 |
|
| 562 |
+
|
| 563 |
+
|
| 564 |
except Exception as e:
|
| 565 |
logger.error(f"Line processing error: {e}")
|
| 566 |
continue
|
| 567 |
|
| 568 |
# 남은 버퍼 처리
|
| 569 |
+
if buffer:
|
| 570 |
+
yield buffer
|
| 571 |
+
|
| 572 |
+
# 전체 출력 길이 로깅
|
| 573 |
+
logger.info(f"Total LLM output length: {len(total_output)} characters, {len(total_output.split())} words")
|
| 574 |
|
| 575 |
+
except Exception as e:
|
| 576 |
+
logger.error(f"LLM streaming error: {e}")
|
| 577 |
+
yield f"❌ 오류: {str(e)}"
|
| 578 |
|
| 579 |
def generate_planning(self, query: str, screenplay_type: str, genre: str) -> Generator[Tuple[str, float, Dict, List, str], None, None]:
|
| 580 |
"""기획안 생성 with 다이어그램"""
|