Skip to content
Snippets Groups Projects
Unverified Commit 726a6326 authored by Carel van Niekerk's avatar Carel van Niekerk Committed by GitHub
Browse files

Update scgpt.py

parent a2d86eff
No related branches found
No related tags found
No related merge requests found
......@@ -26,12 +26,15 @@ class SCGPT(NLG):
model_dir = os.path.dirname(os.path.abspath(__file__))
if not os.path.isfile(model_file):
model_file = cached_path(model_file)
if not os.path.isdir(model_file):
archive = zipfile.ZipFile(model_file, 'r')
archive.extractall(model_dir)
# Get model directory
model_file = archive.filelist[0].filename.replace('/', '')
self.model_name_or_path = os.path.join(model_dir, model_file)
else:
self.model_name_or_path = model_file
self.length = 50
self.num_samples = 5
self.temperature = 1.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment