Spaces:
Running
on
T4
Running
on
T4
SandLogicTechnologies
commited on
Commit
•
2656481
1
Parent(s):
883fd6c
Update app.py
Browse files
app.py
CHANGED
@@ -42,12 +42,12 @@ def generate(
|
|
42 |
top_k: int = 50,
|
43 |
repetition_penalty: float = 1.2,
|
44 |
) -> Iterator[str]:
|
45 |
-
|
46 |
-
conversation = []
|
47 |
for user, assistant in chat_history:
|
48 |
conversation.extend(
|
49 |
[
|
50 |
-
|
51 |
{"role": "user", "content": user},
|
52 |
{"role": "assistant", "content": assistant},
|
53 |
]
|
|
|
42 |
top_k: int = 50,
|
43 |
repetition_penalty: float = 1.2,
|
44 |
) -> Iterator[str]:
|
45 |
+
conversation = [json.loads(os.getenv("PROMPT"))]
|
46 |
+
# conversation = []
|
47 |
for user, assistant in chat_history:
|
48 |
conversation.extend(
|
49 |
[
|
50 |
+
json.loads(os.getenv("PROMPT")),
|
51 |
{"role": "user", "content": user},
|
52 |
{"role": "assistant", "content": assistant},
|
53 |
]
|