Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
4 |
import pandas as pd
|
5 |
from datetime import datetime, timedelta, timezone
|
6 |
import torch
|
7 |
-
from config import hugging_face_token, init_google_sheets_client, models, default_model_name, user_names, google_sheets_name,
|
8 |
import spaces
|
9 |
|
10 |
# Hack for ZeroGPU
|
@@ -98,7 +98,7 @@ def interact(user_input, history):
|
|
98 |
interaction_count += 1
|
99 |
print(f"Interaction count: {interaction_count}")
|
100 |
|
101 |
-
if interaction_count >=
|
102 |
response += ". Thank you for the questions. That's all for now. Goodbye!"
|
103 |
history[-1]["content"] = response
|
104 |
|
|
|
4 |
import pandas as pd
|
5 |
from datetime import datetime, timedelta, timezone
|
6 |
import torch
|
7 |
+
from config import hugging_face_token, init_google_sheets_client, models, default_model_name, user_names, google_sheets_name, MAX_INTERACTIONS
|
8 |
import spaces
|
9 |
|
10 |
# Hack for ZeroGPU
|
|
|
98 |
interaction_count += 1
|
99 |
print(f"Interaction count: {interaction_count}")
|
100 |
|
101 |
+
if interaction_count >= MAX_INTERACTIONS:
|
102 |
response += ". Thank you for the questions. That's all for now. Goodbye!"
|
103 |
history[-1]["content"] = response
|
104 |
|