Spaces:
Runtime error
Runtime error
Download example_run.py from JEdward7777/SentenceTransmorgrifier: direct link, hf CLI and curl.
- Browser
- Download file 452 Bytes
-
https://huggingface.co/spaces/JEdward7777/SentenceTransmorgrifier/resolve/main/example_run.py
- Command line
-
hf download hf://spaces/JEdward7777/SentenceTransmorgrifier/example_run.py
-
curl -L -o example_run.py https://huggingface.co/spaces/JEdward7777/SentenceTransmorgrifier/resolve/main/example_run.py
452 Bytes
| import pandas as pd | |
| import transmorgrify | |
| #load inference data | |
| inference_data = pd.read_csv( "phonetics_out_gpu_4000.csv" ) | |
| #Load the model | |
| my_model = transmorgrify.Transmorgrifier() | |
| my_model.load( "my_model.tm" ) | |
| #do the inference | |
| #model returns a generator so wrap it with a list | |
| for result in my_model.execute( inference_data["in_data"] ): | |
| print( result ) | |
| # results = list( my_model.execute( inference_data["in_data"] ) ) | |
| # print( results ) |