The error is raised in:
 x = self.fc1(text)

Print the shape of text before passing it to self.fc1 and make sure the in_features of the linear layer and the feature size of text are equal.
PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier.