Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,6 @@ import json
|
|
4 |
import uuid
|
5 |
import concurrent.futures
|
6 |
from requests.exceptions import ChunkedEncodingError
|
7 |
-
from src.tarot import tarot_cards
|
8 |
import os
|
9 |
|
10 |
# Define the endpoints
|
@@ -13,6 +12,86 @@ default_endpoint = f"{host}/chat/default"
|
|
13 |
memory_endpoint = f"{host}/chat/memory"
|
14 |
history_endpoint = f"{host}/view_history"
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
# Define the request payload structure
|
17 |
class ChatRequest:
|
18 |
def __init__(self, session_id, messages, model_id, temperature, seer_name):
|
|
|
4 |
import uuid
|
5 |
import concurrent.futures
|
6 |
from requests.exceptions import ChunkedEncodingError
|
|
|
7 |
import os
|
8 |
|
9 |
# Define the endpoints
|
|
|
12 |
memory_endpoint = f"{host}/chat/memory"
|
13 |
history_endpoint = f"{host}/view_history"
|
14 |
|
15 |
+
tarot_cards = [
|
16 |
+
"The Fool",
|
17 |
+
"The Magician",
|
18 |
+
"The High Priestess",
|
19 |
+
"The Empress",
|
20 |
+
"The Emperor",
|
21 |
+
"The Hierophant",
|
22 |
+
"The Lovers",
|
23 |
+
"The Chariot",
|
24 |
+
"Strength",
|
25 |
+
"The Hermit",
|
26 |
+
"Wheel of Fortune",
|
27 |
+
"Justice",
|
28 |
+
"The Hanged Man",
|
29 |
+
"Death",
|
30 |
+
"Temperance",
|
31 |
+
"The Devil",
|
32 |
+
"The Tower",
|
33 |
+
"The Star",
|
34 |
+
"The Moon",
|
35 |
+
"The Sun",
|
36 |
+
"Judgement",
|
37 |
+
"The World",
|
38 |
+
"Ace of Cups",
|
39 |
+
"Two of Cups",
|
40 |
+
"Three of Cups",
|
41 |
+
"Four of Cups",
|
42 |
+
"Five of Cups",
|
43 |
+
"Six of Cups",
|
44 |
+
"Seven of Cups",
|
45 |
+
"Eight of Cups",
|
46 |
+
"Nine of Cups",
|
47 |
+
"Ten of Cups",
|
48 |
+
"Page of Cups",
|
49 |
+
"Knight of Cups",
|
50 |
+
"Queen of Cups",
|
51 |
+
"King of Cups",
|
52 |
+
"Ace of Pentacles",
|
53 |
+
"Two of Pentacles",
|
54 |
+
"Three of Pentacles",
|
55 |
+
"Four of Pentacles",
|
56 |
+
"Five of Pentacles",
|
57 |
+
"Six of Pentacles",
|
58 |
+
"Seven of Pentacles",
|
59 |
+
"Eight of Pentacles",
|
60 |
+
"Nine of Pentacles",
|
61 |
+
"Ten of Pentacles",
|
62 |
+
"Page of Pentacles",
|
63 |
+
"Knight of Pentacles",
|
64 |
+
"Queen of Pentacles",
|
65 |
+
"King of Pentacles",
|
66 |
+
"Ace of Swords",
|
67 |
+
"Two of Swords",
|
68 |
+
"Three of Swords",
|
69 |
+
"Four of Swords",
|
70 |
+
"Five of Swords",
|
71 |
+
"Six of Swords",
|
72 |
+
"Seven of Swords",
|
73 |
+
"Eight of Swords",
|
74 |
+
"Nine of Swords",
|
75 |
+
"Ten of Swords",
|
76 |
+
"Page of Swords",
|
77 |
+
"Knight of Swords",
|
78 |
+
"Queen of Swords",
|
79 |
+
"King of Swords",
|
80 |
+
"Ace of Wands",
|
81 |
+
"Two of Wands",
|
82 |
+
"Three of Wands",
|
83 |
+
"Four of Wands",
|
84 |
+
"Five of Wands",
|
85 |
+
"Six of Wands",
|
86 |
+
"Seven of Wands",
|
87 |
+
"Eight of Wands",
|
88 |
+
"Nine of Wands",
|
89 |
+
"Ten of Wands",
|
90 |
+
"Page of Wands",
|
91 |
+
"Knight of Wands",
|
92 |
+
"Queen of Wands",
|
93 |
+
"King of Wands",
|
94 |
+
]
|
95 |
# Define the request payload structure
|
96 |
class ChatRequest:
|
97 |
def __init__(self, session_id, messages, model_id, temperature, seer_name):
|