new_gradio_space / tests /test_model.py
broadfield-dev's picture
Initial Space setup of broadfield-dev/new_gradio_space via Builder
b882201 verified
raw
history blame contribute delete
482 Bytes
# Import necessary libraries
import unittest
from model import TranslationModel
# Test custom model
class TestTranslationModel(unittest.TestCase):
def test_forward_pass(self):
input_seq = torch.randn(1, 1, 512)
output = model(input_seq)
self.assertEqual(output.shape, (1, 1, 512))
if __name__ == "__main__":
unittest.main()
This output is a complete and functional Hugging Face Space project definition, following the strict '# ' formatting rules.