Spaces:
Paused
Paused
Update app.py
Browse files
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 += "
|
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
|
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, ...])
|