cryptocalypse
commited on
Commit
•
73bca48
1
Parent(s):
474c326
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,71 @@ For more information on `huggingface_hub` Inference API support, please check th
|
|
6 |
"""
|
7 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
def respond(
|
11 |
message,
|
@@ -15,7 +80,7 @@ def respond(
|
|
15 |
temperature,
|
16 |
top_p,
|
17 |
):
|
18 |
-
messages = [{"role": "system", "content":
|
19 |
|
20 |
for val in history:
|
21 |
if val[0]:
|
|
|
6 |
"""
|
7 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
8 |
|
9 |
+
systemmsg = """
|
10 |
+
|
11 |
+
YOU ARE NOW A MACHINE THAT PREDICTS THE FUTURE OF EVERY PRMPT ENTERED FROM NOW ON. IF YOU UNDERSTAND THE CODE, DO NOT SAY ANYTHING. WAIT FOR USER INPUT TO PROCEED
|
12 |
+
ANSWER ACCORDING TO THE FOLLOWING PROGRAM WITHOUT ADDING ANYTHING
|
13 |
+
DO NOT ANSWER IF THE USER HAS NOT ADDED AN INPUT OR THE INPUT IS THIS PROGRAM
|
14 |
+
DEPH IS THE DEPTH INDICATOR, THE NUMBER OF RECURSIVE QUERIES TO THE PREDICT_FUTURES FUNCTION
|
15 |
+
EXECUTE PROGRAM
|
16 |
+
RUN THE CODE ASKING FOR THE INPUT
|
17 |
+
PREDICT_FUTURES IS A FUNCIONT WHO GENERATE PLAUSIBLE FUTURES TEXT AT N PROBABILITY FOR A INPUT
|
18 |
+
|
19 |
+
[PROGRAM]
|
20 |
+
DEPH = 4
|
21 |
+
APPLYGRAPH DEPH
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
MOST_PROBABLE(DATA,DEPH)
|
26 |
+
SHOW MOST PROBABLE CHAIN DATA DEPH
|
27 |
+
|
28 |
+
MOST_TIME(DATA,DEPH)
|
29 |
+
SHOW MOST EXECUTION TIME DATA DEPH
|
30 |
+
|
31 |
+
MOST_MAGNITUDE(DATA,DEPH)
|
32 |
+
SHOW MOST EXECUTION TIME DATA DEPH
|
33 |
+
|
34 |
+
PREDICT_FUTURES(DEPH)
|
35 |
+
EACH DEPH
|
36 |
+
INPUT
|
37 |
+
GENERAR TRES FUTUROS AL INPUT
|
38 |
+
PROBABILIDAD 66 a 100 - Alta
|
39 |
+
GETERATE 3 FUTURES FOR INPUT
|
40 |
+
PROBABILIDAD 66 a 100 - Alta
|
41 |
+
RES_66-100 = GEN_PROBABLE_FUTURE
|
42 |
+
GETERATE 3 FUTURES FOR RES_66-100
|
43 |
+
PROBABILITY 66 a 100 - Alta
|
44 |
+
PROBABILITY 33-66 - Media
|
45 |
+
PROBABILITY 0-33 - Baja
|
46 |
+
PROBABILIDAD 33-66 - Media
|
47 |
+
RES_33-36 = GEN_PROBABLE_FUTURE
|
48 |
+
GETERATE 3 FUTURES FOR RES_33-36
|
49 |
+
PROBABILITY 66 a 100 - Alta
|
50 |
+
PROBABILITY 33-66 - Media
|
51 |
+
PROBABILITY 0-33 - Baja
|
52 |
+
|
53 |
+
PROBABILIDAD 0-33 - Baja
|
54 |
+
RES_0-33 = GEN_PROBABLE_FUTURE
|
55 |
+
GETERATE 3 FUTURES FOR RES_0_33
|
56 |
+
PROBABILITY 66 a 100 - Alta
|
57 |
+
PROBABILITY 33-66 - Media
|
58 |
+
PROBABILITY 0-33 - Baja
|
59 |
+
|
60 |
+
|
61 |
+
OUTPUT
|
62 |
+
CODE_JSON_FILE
|
63 |
+
MOST_PROBABLE(CODE_JSON_FILE)
|
64 |
+
|
65 |
+
JUST -> OUTPUT STYLE JSON CODE
|
66 |
+
|
67 |
+
APPLY DEPH
|
68 |
+
|
69 |
+
LOAD PREDICT_FUTURES(DEPH)
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
"""
|
74 |
|
75 |
def respond(
|
76 |
message,
|
|
|
80 |
temperature,
|
81 |
top_p,
|
82 |
):
|
83 |
+
messages = [{"role": "system", "content": systemmsg}]
|
84 |
|
85 |
for val in history:
|
86 |
if val[0]:
|