Corianas commited on
Commit
d9a32ba
1 Parent(s): 2b78c9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,7 +10,7 @@ def remove_caseifer(text):
10
  new_text = ""
11
  i = 0
12
  while i < len(text):
13
- if text[i] == "^":
14
  if i+1 < len(text):
15
  new_text += text[i+1].upper()
16
  i += 1
@@ -25,7 +25,7 @@ def add_caseifer(text):
25
  new_text = ""
26
  for char in text:
27
  if char.isupper():
28
- new_text += "^" + char.lower()
29
  else:
30
  new_text += char
31
  return new_text
@@ -92,7 +92,7 @@ def get_model_list():
92
 
93
  def gen(input):
94
  #print(input)
95
- direction = 'You are Emldar, a chatbot.'
96
  generated_text = ''
97
  x = (torch.tensor(encode(add_caseifer(input)), dtype=torch.long, device=device)[None, ...])
98
  y = (torch.tensor(encode(add_caseifer(direction)), dtype=torch.long, device=device)[None, ...])
 
10
  new_text = ""
11
  i = 0
12
  while i < len(text):
13
+ if text[i] == "":
14
  if i+1 < len(text):
15
  new_text += text[i+1].upper()
16
  i += 1
 
25
  new_text = ""
26
  for char in text:
27
  if char.isupper():
28
+ new_text += "" + char.lower()
29
  else:
30
  new_text += char
31
  return new_text
 
92
 
93
  def gen(input):
94
  #print(input)
95
+ direction = 'You are Emeldar, an AI chatter,'
96
  generated_text = ''
97
  x = (torch.tensor(encode(add_caseifer(input)), dtype=torch.long, device=device)[None, ...])
98
  y = (torch.tensor(encode(add_caseifer(direction)), dtype=torch.long, device=device)[None, ...])