Spaces:
Sleeping
Sleeping
call google sheets
Browse files
app.py
CHANGED
|
@@ -143,20 +143,16 @@ def stream_chat(message: str,
|
|
| 143 |
yield buffer
|
| 144 |
|
| 145 |
try:
|
| 146 |
-
|
| 147 |
-
# chatbot_a[-1][1] Second index of last in list
|
| 148 |
-
|
| 149 |
sheet_row = [message, buffer, temperature, max_new_tokens, top_p, top_k, penalty]
|
| 150 |
logging.debug(f'{SPACER}Output row: {sheet_row}\n{SPACER}')
|
| 151 |
sheet = get_google_sheet()
|
| 152 |
sheet.append_row(sheet_row, table_range="A1:G1")
|
| 153 |
-
|
| 154 |
-
|
| 155 |
except Exception as e:
|
| 156 |
logging.error(f'{SPACER} Error: {e}, Traceback {traceback.format_exc()}')
|
| 157 |
logging.debug(f'Generation done: {buffer}')
|
| 158 |
|
| 159 |
-
|
|
|
|
| 160 |
chatbot = gr.Chatbot(height=400, placeholder=PLACEHOLDER)
|
| 161 |
|
| 162 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
|
|
| 143 |
yield buffer
|
| 144 |
|
| 145 |
try:
|
|
|
|
|
|
|
|
|
|
| 146 |
sheet_row = [message, buffer, temperature, max_new_tokens, top_p, top_k, penalty]
|
| 147 |
logging.debug(f'{SPACER}Output row: {sheet_row}\n{SPACER}')
|
| 148 |
sheet = get_google_sheet()
|
| 149 |
sheet.append_row(sheet_row, table_range="A1:G1")
|
|
|
|
|
|
|
| 150 |
except Exception as e:
|
| 151 |
logging.error(f'{SPACER} Error: {e}, Traceback {traceback.format_exc()}')
|
| 152 |
logging.debug(f'Generation done: {buffer}')
|
| 153 |
|
| 154 |
+
|
| 155 |
+
|
| 156 |
chatbot = gr.Chatbot(height=400, placeholder=PLACEHOLDER)
|
| 157 |
|
| 158 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|