Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,11 +50,11 @@ def chat(x):
|
|
50 |
50, # int, representing input in 'Top-k (nucleus sampling)' Slider component
|
51 |
0.7, # float, representing input in 'Temperature' Slider component
|
52 |
22, # int, representing input in 'Max New Tokens' Slider component
|
53 |
-
1.
|
54 |
fn_index=0
|
55 |
)
|
56 |
output = result[len(x)-2:]
|
57 |
-
outout = re.sub("νν", "γ
γ
", output)
|
58 |
output = output.split('<|endoftext|>')[0]
|
59 |
output = output.split('\n')[0]
|
60 |
output = re.sub('[=+#/\:@*\"β»γγβ|\\\<\>\(\)\[\]`\'β¦γ\β\β\βΒ·]', ' ', output)
|
@@ -73,7 +73,7 @@ with gr.Blocks() as demo:
|
|
73 |
inputs="text",
|
74 |
outputs="text",
|
75 |
description="chat",
|
76 |
-
examples= [["\nfriend: λλ κΏμ΄ λμΌ? \n\n### \nyou: "],["\nyou: λλ λ¬΄μ¨ μμ κ°μ₯ μ’μν΄? \nfriend: κΈμ λλ? \n\n### \nyou: "]]
|
77 |
)
|
78 |
|
79 |
bb = gr.Interface(
|
|
|
50 |
50, # int, representing input in 'Top-k (nucleus sampling)' Slider component
|
51 |
0.7, # float, representing input in 'Temperature' Slider component
|
52 |
22, # int, representing input in 'Max New Tokens' Slider component
|
53 |
+
1.1, # float, representing input in 'repetition_penalty' Slider component
|
54 |
fn_index=0
|
55 |
)
|
56 |
output = result[len(x)-2:]
|
57 |
+
outout = re.sub("[νν]", "γ
γ
", output)
|
58 |
output = output.split('<|endoftext|>')[0]
|
59 |
output = output.split('\n')[0]
|
60 |
output = re.sub('[=+#/\:@*\"β»γγβ|\\\<\>\(\)\[\]`\'β¦γ\β\β\βΒ·]', ' ', output)
|
|
|
73 |
inputs="text",
|
74 |
outputs="text",
|
75 |
description="chat",
|
76 |
+
examples= [[f"\nfriend: λλ κΏμ΄ λμΌ? \n\n### \nyou: "],[f"\nyou: λλ λ¬΄μ¨ μμ κ°μ₯ μ’μν΄? \nfriend: κΈμ λλ? \n\n### \nyou: "]]
|
77 |
)
|
78 |
|
79 |
bb = gr.Interface(
|