Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,17 +58,17 @@ def generate(
|
|
58 |
yield history + [(message, response)]
|
59 |
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
|
67 |
|
68 |
-
def process_example(message: str) -> tuple[str, list[tuple[str, str]]]:
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
|
73 |
|
74 |
|
|
|
58 |
yield history + [(message, response)]
|
59 |
|
60 |
|
61 |
+
def process_example(message: str) -> tuple[str, list[tuple[str, str]]]:
|
62 |
+
generator = generate(message, [], DEFAULT_SYSTEM_PROMPT, 1024, 1, 0.95, 50)
|
63 |
+
for x in generator:
|
64 |
+
pass
|
65 |
+
return '', x
|
66 |
|
67 |
|
68 |
+
# def process_example(message: str) -> tuple[str, list[tuple[str, str]]]:
|
69 |
+
# response = generate(message, [], DEFAULT_SYSTEM_PROMPT, 1024, 1, 0.95, 50)
|
70 |
+
# # Assuming you want to return the response as the second element of the tuple, wrapped in a list.
|
71 |
+
# return '', [(message, response)]
|
72 |
|
73 |
|
74 |
|