markrodrigo commited on
Commit ·
362a16b
1
Parent(s): ea6174b
finish this
Browse files
app.py
CHANGED
|
@@ -71,12 +71,18 @@ def get_latest_counter():
|
|
| 71 |
global global_counter
|
| 72 |
return global_counter # Dynamically fetches the current server value
|
| 73 |
|
| 74 |
-
|
| 75 |
-
def respond(user_message, chat_history): # , counter):
|
| 76 |
-
|
| 77 |
global global_counter
|
| 78 |
global_counter += 1
|
|
|
|
| 79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
# 1. Increment counter
|
| 81 |
# counter += 1
|
| 82 |
|
|
|
|
| 71 |
global global_counter
|
| 72 |
return global_counter # Dynamically fetches the current server value
|
| 73 |
|
| 74 |
+
def increment_counter():
|
|
|
|
|
|
|
| 75 |
global global_counter
|
| 76 |
global_counter += 1
|
| 77 |
+
return global_counter
|
| 78 |
|
| 79 |
+
@spaces.GPU
|
| 80 |
+
def respond(user_message, chat_history): # , counter):
|
| 81 |
+
|
| 82 |
+
# global global_counter
|
| 83 |
+
# global_counter += 1
|
| 84 |
+
global_counter = self.increment_counter()
|
| 85 |
+
|
| 86 |
# 1. Increment counter
|
| 87 |
# counter += 1
|
| 88 |
|