Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def mbti(x):
|
|
45 |
|
46 |
def chat(x):
|
47 |
x = f"[***λλ Assistantμ
λλ€. μλμκ² λ€μν μ§λ¬Έμ νλ©° λνλ₯Ό μ΄λκ³ μμ΅λλ€. Humanμκ² κΈμ μ μ΄κ³ , 곡κ°νλ©°, μ΅λν κΈΈκ² λλ΅ν΄μ£ΌμΈμ***] {x}"
|
48 |
-
x = x.replace('\nfriend',
|
49 |
print("\n" + f"{x}")
|
50 |
result = gradio_client.predict(
|
51 |
x,
|
@@ -82,7 +82,7 @@ with gr.Blocks() as demo:
|
|
82 |
outputs="text",
|
83 |
description="chat",
|
84 |
#examples= [[f"\nfriend: λλ κΏμ΄ λμΌ? \n\n### \nyou: "],[f"\nyou: λλ λ¬΄μ¨ μμ κ°μ₯ μ’μν΄? \nfriend: κΈμ λλ? \n\n### \nyou: "]]
|
85 |
-
examples= [[f"
|
86 |
)
|
87 |
|
88 |
bb = gr.Interface(
|
@@ -96,6 +96,7 @@ with gr.Blocks() as demo:
|
|
96 |
fn=yn,
|
97 |
inputs="text",
|
98 |
outputs="text",
|
99 |
-
description="yn"
|
|
|
100 |
)
|
101 |
demo.queue(max_size=32).launch(enable_queue=True)
|
|
|
45 |
|
46 |
def chat(x):
|
47 |
x = f"[***λλ Assistantμ
λλ€. μλμκ² λ€μν μ§λ¬Έμ νλ©° λνλ₯Ό μ΄λκ³ μμ΅λλ€. Humanμκ² κΈμ μ μ΄κ³ , 곡κ°νλ©°, μ΅λν κΈΈκ² λλ΅ν΄μ£ΌμΈμ***] {x}"
|
48 |
+
x = x.replace('\nfriend','\\nHuman').replace('\nyou','\\nAssistant').replace('\n\n###','\\n\\n###')
|
49 |
print("\n" + f"{x}")
|
50 |
result = gradio_client.predict(
|
51 |
x,
|
|
|
82 |
outputs="text",
|
83 |
description="chat",
|
84 |
#examples= [[f"\nfriend: λλ κΏμ΄ λμΌ? \n\n### \nyou: "],[f"\nyou: λλ λ¬΄μ¨ μμ κ°μ₯ μ’μν΄? \nfriend: κΈμ λλ? \n\n### \nyou: "]]
|
85 |
+
examples= [[f"\\nHuman: λλ κΏμ΄ λμΌ? \\n\\n### \\nAssistant: "],[f"\\nAssistant: λλ λ¬΄μ¨ μμ κ°μ₯ μ’μν΄? \\nHuman: λλ νλμμ΄ μ’λλΌ. λλ λ¬΄μ¨ μμ΄ μ’μ? \\n\\n### \\nAssistant: "]]
|
86 |
)
|
87 |
|
88 |
bb = gr.Interface(
|
|
|
96 |
fn=yn,
|
97 |
inputs="text",
|
98 |
outputs="text",
|
99 |
+
description="yn",
|
100 |
+
examples= [[f"κ·Έλ¬λκ°"],[f"λ³λ‘ λ°?"]]
|
101 |
)
|
102 |
demo.queue(max_size=32).launch(enable_queue=True)
|