File size: 365 Bytes
6ebde35 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# 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
|