Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,24 +33,8 @@ def chat(x):
|
|
| 33 |
x = f"[***๋๋ Assistant์
๋๋ค. ์๋์๊ฒ ๋ค์ํ ์ง๋ฌธ์ ํ๋ฉฐ ๋ํ๋ฅผ ์ด๋๊ณ ์์ต๋๋ค. Human์๊ฒ ๊ธ์ ์ ์ด๊ณ , ๊ณต๊ฐํ๋ฉฐ, ์ต๋ํ ๊ธธ๊ฒ ๋๋ตํด์ฃผ์ธ์***]\nHuman: {x}\n\n###\nAssistant:"
|
| 34 |
|
| 35 |
print("\n___________________\n" + f"{x}")
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
# str representing input in 'User input' Textbox component
|
| 39 |
-
0.91, # float, representing input in 'Top-p (nucleus sampling)' Slider component
|
| 40 |
-
40, # int, representing input in 'Top-k (nucleus sampling)' Slider component
|
| 41 |
-
0.65, # float, representing input in 'Temperature' Slider component
|
| 42 |
-
20, # int, representing input in 'Max New Tokens' Slider component
|
| 43 |
-
1.2, # float, representing input in 'repetition_penalty' Slider component
|
| 44 |
-
fn_index=0
|
| 45 |
-
)
|
| 46 |
-
result = str(result)
|
| 47 |
-
output = result[len(x.rsplit(':', 1)[0])+2:]
|
| 48 |
-
output = re.sub('ํํ','ใ
ใ
', output)
|
| 49 |
-
output = output.split('๋')[0]
|
| 50 |
-
output = output.split('endoftext')[0]
|
| 51 |
-
output = re.sub('[=+#/\:@*\"โปใใโ|\\\<\>\(\)\[\]`\'โฆใ\โ\โ\โยท]', '', output)
|
| 52 |
-
#output = re.sub('[a-zA-Z]',' ',output)
|
| 53 |
-
|
| 54 |
return output
|
| 55 |
|
| 56 |
with gr.Blocks() as demo:
|
|
|
|
| 33 |
x = f"[***๋๋ Assistant์
๋๋ค. ์๋์๊ฒ ๋ค์ํ ์ง๋ฌธ์ ํ๋ฉฐ ๋ํ๋ฅผ ์ด๋๊ณ ์์ต๋๋ค. Human์๊ฒ ๊ธ์ ์ ์ด๊ณ , ๊ณต๊ฐํ๋ฉฐ, ์ต๋ํ ๊ธธ๊ฒ ๋๋ตํด์ฃผ์ธ์***]\nHuman: {x}\n\n###\nAssistant:"
|
| 34 |
|
| 35 |
print("\n___________________\n" + f"{x}")
|
| 36 |
+
|
| 37 |
+
output = "Hello?"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
return output
|
| 39 |
|
| 40 |
with gr.Blocks() as demo:
|