First Push
This commit is contained in:
27
test_my_story.py
Normal file
27
test_my_story.py
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
sys.path.insert(0, 'backend')
|
||||
|
||||
import asyncio
|
||||
from services.role_detector import RoleDetector
|
||||
from services.ollama_service import OllamaService
|
||||
|
||||
async def test():
|
||||
# Read the actual story
|
||||
with open('Test Story.txt', 'r') as f:
|
||||
story = f.read()
|
||||
|
||||
print(f'Story length: {len(story)} characters\n')
|
||||
|
||||
# Test role detection
|
||||
ollama_service = OllamaService()
|
||||
role_detector = RoleDetector(ollama_service=ollama_service)
|
||||
|
||||
print('Testing role detection...')
|
||||
roles = await role_detector.detect_roles(story)
|
||||
|
||||
print(f'\nDetected {len(roles)} roles:')
|
||||
for role in roles:
|
||||
print(f' - {role["label"]}')
|
||||
|
||||
asyncio.run(test())
|
||||
Reference in New Issue
Block a user