Sakalti commited on
Commit
a063b3a
·
verified ·
1 Parent(s): 2557bdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -13,7 +13,9 @@ def generate_response(prompt):
13
  return response['choices'][0]['text'].strip()
14
 
15
  # Gradio インターフェースを作成
16
- def chat_with_model(input_text, history=[]):
 
 
17
  history.append(("You", input_text))
18
  response = generate_response(input_text)
19
  history.append(("Model", response))
 
13
  return response['choices'][0]['text'].strip()
14
 
15
  # Gradio インターフェースを作成
16
+ def chat_with_model(input_text, history=None):
17
+ if history is None:
18
+ history = []
19
  history.append(("You", input_text))
20
  response = generate_response(input_text)
21
  history.append(("Model", response))