Spaces:
Runtime error
Runtime error
fix: chatbot state might have the info that I need
Browse files
app.py
CHANGED
@@ -152,8 +152,6 @@ chatbot = gr.Chatbot(label="PersianGPT",
|
|
152 |
show_copy_button=True,
|
153 |
bubble_full_width = False)
|
154 |
|
155 |
-
print(dir(chatbot))
|
156 |
-
|
157 |
textbox = gr.Textbox(
|
158 |
label="textbox",
|
159 |
container=False,
|
@@ -172,6 +170,8 @@ chat_interface = gr.ChatInterface(
|
|
172 |
cache_examples=False,
|
173 |
)
|
174 |
|
|
|
|
|
175 |
def evolve_text(x):
|
176 |
|
177 |
possible_generation = "".join([x for x in generate(
|
@@ -197,8 +197,8 @@ def vote(data: gr.LikeData):
|
|
197 |
{
|
198 |
"index": data.index,
|
199 |
"time_stamp": time.time(),
|
200 |
-
"prompt":
|
201 |
-
"history":
|
202 |
"system prompt": additional_inputs[0].value,
|
203 |
"temperature": additional_inputs[1].value,
|
204 |
"max_new_tokens": additional_inputs[2].value,
|
|
|
152 |
show_copy_button=True,
|
153 |
bubble_full_width = False)
|
154 |
|
|
|
|
|
155 |
textbox = gr.Textbox(
|
156 |
label="textbox",
|
157 |
container=False,
|
|
|
170 |
cache_examples=False,
|
171 |
)
|
172 |
|
173 |
+
print(dir(chat_interface))
|
174 |
+
|
175 |
def evolve_text(x):
|
176 |
|
177 |
possible_generation = "".join([x for x in generate(
|
|
|
197 |
{
|
198 |
"index": data.index,
|
199 |
"time_stamp": time.time(),
|
200 |
+
"prompt": chat_interface.chatbot_state,
|
201 |
+
"history": chat_interface.chatbot_state,
|
202 |
"system prompt": additional_inputs[0].value,
|
203 |
"temperature": additional_inputs[1].value,
|
204 |
"max_new_tokens": additional_inputs[2].value,
|