# Use a 🤗pipeline as a high-level helper | |
from transformers import pipeline | |
def solve_with_transformers(text): | |
""" | |
Solve the given text using 🤗transformers | |
:param text: The text to solve | |
:return: The solved text | |
""" | |
pipe = pipeline("text-generation", model="meta-math/MetaMath-Mistral-7B") | |
answer = pipe(text) | |
return answer | |