Files
wehub-resource-sync 3a7c47b2a6
build / build (macos-latest) (push) Has been cancelled
build / build (ubuntu-latest) (push) Has been cancelled
build / build (windows-latest) (push) Has been cancelled
minimal / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:38:00 +08:00

25 lines
440 B
Python

"""
Generator module tests
"""
import unittest
from txtai.pipeline import Generator
class TestGenerator(unittest.TestCase):
"""
Sequences tests.
"""
def testGeneration(self):
"""
Test text pipeline generation
"""
model = Generator("hf-internal-testing/tiny-random-gpt2")
start = "Hello, how are"
# Test that text is generated
self.assertIsNotNone(model(start))