Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,11 +41,12 @@ def mbti(x):
|
|
| 41 |
r = sorted(eval(result), key=lambda x : x['score'], reverse=True)
|
| 42 |
|
| 43 |
return r
|
| 44 |
-
|
|
|
|
| 45 |
def chat(x):
|
| 46 |
x = f"[***๋๋ Assistant์
๋๋ค. ์๋์๊ฒ ๋ค์ํ ์ง๋ฌธ์ ํ๋ฉฐ ๋ํ๋ฅผ ์ด๋๊ณ ์์ต๋๋ค. Human์๊ฒ ๊ธ์ ์ ์ด๊ณ , ๊ณต๊ฐํ๋ฉฐ, ์ต๋ํ ๊ธธ๊ฒ ๋๋ตํด์ฃผ์ธ์***] {x}"
|
| 47 |
x = x.replace('friend','Human').replace('you','Assistant')
|
| 48 |
-
print("\n" + f"{x}")
|
| 49 |
result = gradio_client.predict(
|
| 50 |
x,
|
| 51 |
# str representing input in 'User input' Textbox component
|
|
|
|
| 41 |
r = sorted(eval(result), key=lambda x : x['score'], reverse=True)
|
| 42 |
|
| 43 |
return r
|
| 44 |
+
|
| 45 |
+
count = 0
|
| 46 |
def chat(x):
|
| 47 |
x = f"[***๋๋ Assistant์
๋๋ค. ์๋์๊ฒ ๋ค์ํ ์ง๋ฌธ์ ํ๋ฉฐ ๋ํ๋ฅผ ์ด๋๊ณ ์์ต๋๋ค. Human์๊ฒ ๊ธ์ ์ ์ด๊ณ , ๊ณต๊ฐํ๋ฉฐ, ์ต๋ํ ๊ธธ๊ฒ ๋๋ตํด์ฃผ์ธ์***] {x}"
|
| 48 |
x = x.replace('friend','Human').replace('you','Assistant')
|
| 49 |
+
print("\n" + str(count++) +"๋ฒ์งธ ์๋ต\n" + f"{x}")
|
| 50 |
result = gradio_client.predict(
|
| 51 |
x,
|
| 52 |
# str representing input in 'User input' Textbox component
|