Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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))
|