Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def mbti(x):
|
|
44 |
|
45 |
def chat(x):
|
46 |
x = f"***κΈΈκ² λλ΅ν΄μ€*** {x}"
|
47 |
-
x = x.replace('friend','
|
48 |
print(f"{x}")
|
49 |
result = gradio_client.predict(
|
50 |
x,
|
@@ -57,7 +57,7 @@ def chat(x):
|
|
57 |
fn_index=0
|
58 |
)
|
59 |
result = str(result)
|
60 |
-
output = result[len(x)-
|
61 |
output = re.sub('νν','γ
γ
', output)
|
62 |
output = output.split('λ')[0]
|
63 |
output = output.split('<|endoftext|>')[0]
|
|
|
44 |
|
45 |
def chat(x):
|
46 |
x = f"***κΈΈκ² λλ΅ν΄μ€*** {x}"
|
47 |
+
x = x.replace('friend','Human').replace('you','Assistant')
|
48 |
print(f"{x}")
|
49 |
result = gradio_client.predict(
|
50 |
x,
|
|
|
57 |
fn_index=0
|
58 |
)
|
59 |
result = str(result)
|
60 |
+
output = result[len(x)-1:]
|
61 |
output = re.sub('νν','γ
γ
', output)
|
62 |
output = output.split('λ')[0]
|
63 |
output = output.split('<|endoftext|>')[0]
|