Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -148,18 +148,34 @@ def add_pingpong(idx, ld, ping):
|
|
| 148 |
ppm.add_pingpong(PingPong(ping, "dang!!!!!!!"))
|
| 149 |
return "", ppm.build_uis(), str(res)
|
| 150 |
|
| 151 |
-
def
|
| 152 |
choice = 0
|
| 153 |
-
|
|
|
|
| 154 |
choice = 0
|
| 155 |
-
elif btn == "2nd":
|
| 156 |
choice = 1
|
| 157 |
-
elif btn == "3rd":
|
| 158 |
choice = 2
|
| 159 |
-
elif btn == "4th":
|
| 160 |
choice = 3
|
| 161 |
-
elif btn == "5th":
|
| 162 |
choice = 4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
res = [
|
| 165 |
GradioAlpacaChatPPManager.from_json(json.dumps(ppm_str))
|
|
|
|
| 148 |
ppm.add_pingpong(PingPong(ping, "dang!!!!!!!"))
|
| 149 |
return "", ppm.build_uis(), str(res)
|
| 150 |
|
| 151 |
+
def channel_num(btn_title):
|
| 152 |
choice = 0
|
| 153 |
+
|
| 154 |
+
if btn == "1st Channel":
|
| 155 |
choice = 0
|
| 156 |
+
elif btn == "2nd Channel":
|
| 157 |
choice = 1
|
| 158 |
+
elif btn == "3rd Channel":
|
| 159 |
choice = 2
|
| 160 |
+
elif btn == "4th Channel":
|
| 161 |
choice = 3
|
| 162 |
+
elif btn == "5th Channel":
|
| 163 |
choice = 4
|
| 164 |
+
elif btn == "6th Channel":
|
| 165 |
+
choice = 5
|
| 166 |
+
elif btn == "7th Channel":
|
| 167 |
+
choice = 6
|
| 168 |
+
elif btn == "8th Channel":
|
| 169 |
+
choice = 7
|
| 170 |
+
elif btn == "9th Channel":
|
| 171 |
+
choice = 8
|
| 172 |
+
elif btn == "10th Channel":
|
| 173 |
+
choice = 9
|
| 174 |
+
|
| 175 |
+
return choice
|
| 176 |
+
|
| 177 |
+
def set_chatbot(btn, ld):
|
| 178 |
+
choice = channel_num(btn)
|
| 179 |
|
| 180 |
res = [
|
| 181 |
GradioAlpacaChatPPManager.from_json(json.dumps(ppm_str))
|