First Push
This commit is contained in:
24
test_ollama_quick.py
Normal file
24
test_ollama_quick.py
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
sys.path.insert(0, 'backend')
|
||||
|
||||
import asyncio
|
||||
from services.ollama_service import OllamaService
|
||||
|
||||
async def test():
|
||||
service = OllamaService()
|
||||
available = await service.is_available()
|
||||
print(f'Ollama available: {available}')
|
||||
|
||||
if available:
|
||||
text = '''Lily asked, "Have you guys heard about the new stream?"
|
||||
Benny's eyes lit up. "Ooh, I love streams!"
|
||||
Sammy nodded enthusiastically. "I've been wanting to explore!"'''
|
||||
|
||||
print(f'\nTesting with sample text ({len(text)} chars)...')
|
||||
speakers = await service.detect_speakers(text)
|
||||
print(f'Detected speakers: {speakers}')
|
||||
else:
|
||||
print('Ollama is not available!')
|
||||
|
||||
asyncio.run(test())
|
||||
Reference in New Issue
Block a user