Infinitode Pty Ltd commited on
Commit
349b488
·
verified ·
1 Parent(s): ca92430

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,8 +6,6 @@ import numpy as np
6
  import pandas as pd
7
  import tensorflow as tf
8
 
9
- max_seq_len = 12 # For skyrim = 13, for terraria = 12
10
-
11
  def custom_pad_sequences(sequences, maxlen, padding='pre', value=0):
12
  """
13
  Pads sequences to the same length.
@@ -95,6 +93,7 @@ def generate_random_name(interpreter, vocab_size, sp, max_length=10, temperature
95
 
96
  def generateNames(type, amount, max_length=30, temperature=0.5, seed_text=""):
97
  if type == "Terraria":
 
98
  sp = spm.SentencePieceProcessor()
99
  sp.load("models/terraria_names.model")
100
  amount = int(amount)
@@ -116,6 +115,7 @@ def generateNames(type, amount, max_length=30, temperature=0.5, seed_text=""):
116
  names.append(generated_name)
117
  return pd.DataFrame(names, columns=['Names'])
118
  elif type == "Skyrim":
 
119
  sp = spm.SentencePieceProcessor()
120
  sp.load("models/skyrim_names.model")
121
  amount = int(amount)
 
6
  import pandas as pd
7
  import tensorflow as tf
8
 
 
 
9
  def custom_pad_sequences(sequences, maxlen, padding='pre', value=0):
10
  """
11
  Pads sequences to the same length.
 
93
 
94
  def generateNames(type, amount, max_length=30, temperature=0.5, seed_text=""):
95
  if type == "Terraria":
96
+ max_seq_len = 12 # For skyrim = 13, for terraria = 12
97
  sp = spm.SentencePieceProcessor()
98
  sp.load("models/terraria_names.model")
99
  amount = int(amount)
 
115
  names.append(generated_name)
116
  return pd.DataFrame(names, columns=['Names'])
117
  elif type == "Skyrim":
118
+ max_seq_len = 13 # For skyrim = 13, for terraria = 12
119
  sp = spm.SentencePieceProcessor()
120
  sp.load("models/skyrim_names.model")
121
  amount = int(amount)