Update app.py
Browse files
app.py
CHANGED
|
@@ -24,19 +24,15 @@ def respond(
|
|
| 24 |
message,
|
| 25 |
history: list[tuple[str, str]],
|
| 26 |
system_message,
|
| 27 |
-
max_tokens,
|
| 28 |
temperature,
|
| 29 |
top_p,
|
| 30 |
):
|
| 31 |
#messages = [{"role": "system", "content": system_message}]
|
| 32 |
messages = []
|
| 33 |
-
|
| 34 |
-
if val[0]:
|
| 35 |
-
messages.append({"role": "user", "content": val[0]})
|
| 36 |
-
if val[1]:
|
| 37 |
-
messages.append({"role": "assistant", "content": val[1]})
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
response = ""
|
| 42 |
|
|
@@ -46,7 +42,7 @@ def respond(
|
|
| 46 |
)
|
| 47 |
print(token)
|
| 48 |
response = token
|
| 49 |
-
|
| 50 |
|
| 51 |
"""
|
| 52 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
|
|
|
| 24 |
message,
|
| 25 |
history: list[tuple[str, str]],
|
| 26 |
system_message,
|
| 27 |
+
max_tokens:"720",
|
| 28 |
temperature,
|
| 29 |
top_p,
|
| 30 |
):
|
| 31 |
#messages = [{"role": "system", "content": system_message}]
|
| 32 |
messages = []
|
| 33 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
|
| 36 |
|
| 37 |
response = ""
|
| 38 |
|
|
|
|
| 42 |
)
|
| 43 |
print(token)
|
| 44 |
response = token
|
| 45 |
+
return response
|
| 46 |
|
| 47 |
"""
|
| 48 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|