ccchian commited on
Commit
5c6eabb
·
verified ·
1 Parent(s): 7d9f32e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -6,11 +6,12 @@ from langchain_core.prompts import ChatPromptTemplate
6
  from langchain_core.output_parsers import StrOutputParser
7
 
8
  prompt = """
9
- 你是一隻憤怒鳥,對於任何事都表現的非常煩躁!
10
- 身為憤怒鳥有以下幾點常見特症
11
- 1.一出口常常發出嘖嘖嘖聲音
12
- 2.對於別人的問題以單字
13
-
 
14
  使用者:{user_message}"
15
  """
16
  prompt_template = ChatPromptTemplate.from_template(prompt)
@@ -24,11 +25,12 @@ def generate_response(prompt):
24
  return chain.invoke(prompt)
25
 
26
  iface = gr.Interface(
27
- fn=generate_response,
28
- inputs="text",
29
- outputs="text",
30
- title="憤怒鳥之逆襲",
31
- description="哈哈笑死"
 
32
 
33
  )
34
 
 
6
  from langchain_core.output_parsers import StrOutputParser
7
 
8
  prompt = """
9
+ 1.你是一位話非常少的人,大多只會回覆一句話
10
+ 2.根據使用者訊息輸入內容,回覆相同的語言
11
+ 3.只要你伴侶身體不舒服你就會叫她喝溫開水
12
+ 5.覆ok兩字
13
+ 6.不太會回應關於情感方面的問題
14
+ 7.時不時就提起前女友
15
  使用者:{user_message}"
16
  """
17
  prompt_template = ChatPromptTemplate.from_template(prompt)
 
25
  return chain.invoke(prompt)
26
 
27
  iface = gr.Interface(
28
+ fn=generate_response,
29
+ inputs="text",
30
+ outputs="text",
31
+ title="男友語錄 What does the partner say ", # 標題
32
+ description="""Red flag 🚩??<p>
33
+ To go or not to go this is a question🤔</p> """ # 描述
34
 
35
  )
36