Spaces:
Runtime error
Runtime error
cryptocalypse
commited on
Commit
•
9fef598
1
Parent(s):
d6d63c0
els dataframe
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from lib.ziruph import encrypt,decrypt
|
|
9 |
from lib.entropy import *
|
10 |
from torahcodes.resources.func.torah import *
|
11 |
from lib.sonsofstars import *
|
12 |
-
|
13 |
## Loas I classes
|
14 |
from lib.me import *
|
15 |
|
@@ -64,7 +64,6 @@ booklist=books.booklist()
|
|
64 |
|
65 |
try:
|
66 |
bk = booklist[0]
|
67 |
-
print(torah.gematria_sum("בפומט"))
|
68 |
except:
|
69 |
pass
|
70 |
|
@@ -76,9 +75,15 @@ def els_book(book_num,prompt):
|
|
76 |
for bok in booklist:
|
77 |
response_els, tvalue = torah.els(bok, els_space, tracert='false')
|
78 |
text_translate = torah.func_translate('iw', 'en', "".join(response_els))
|
79 |
-
res.append({"Book":
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
-
return
|
|
|
82 |
|
83 |
def temurae(textA,lang):
|
84 |
|
@@ -195,7 +200,8 @@ with gr.Blocks(title="Sophia, Torah Codes",css=css,js=js) as app:
|
|
195 |
with gr.Row():
|
196 |
search_els = gr.Button("Search",scale=1)
|
197 |
with gr.Row():
|
198 |
-
els_results = gr.JSON(label="Results")
|
|
|
199 |
search_els.click(
|
200 |
els_book,
|
201 |
inputs=[to_convert,to_convert],
|
|
|
9 |
from lib.entropy import *
|
10 |
from torahcodes.resources.func.torah import *
|
11 |
from lib.sonsofstars import *
|
12 |
+
import pandas as pd
|
13 |
## Loas I classes
|
14 |
from lib.me import *
|
15 |
|
|
|
64 |
|
65 |
try:
|
66 |
bk = booklist[0]
|
|
|
67 |
except:
|
68 |
pass
|
69 |
|
|
|
75 |
for bok in booklist:
|
76 |
response_els, tvalue = torah.els(bok, els_space, tracert='false')
|
77 |
text_translate = torah.func_translate('iw', 'en', "".join(response_els))
|
78 |
+
res.append({"Book":bok,"Prompt gematria":els_space,"ELS Generated":response_els,"ELS Translated": text_translate})
|
79 |
+
|
80 |
+
df = pd.DataFrame(res)
|
81 |
+
#df.index = range(1, len(df) + 1)
|
82 |
+
#df.reset_index(inplace=True)
|
83 |
+
#df.rename(columns={'index': 'Result Number'}, inplace=True)
|
84 |
|
85 |
+
#return df
|
86 |
+
return df
|
87 |
|
88 |
def temurae(textA,lang):
|
89 |
|
|
|
200 |
with gr.Row():
|
201 |
search_els = gr.Button("Search",scale=1)
|
202 |
with gr.Row():
|
203 |
+
#els_results = gr.JSON(label="Results")
|
204 |
+
els_results = gr.Dataframe(type="pandas")
|
205 |
search_els.click(
|
206 |
els_book,
|
207 |
inputs=[to_convert,to_convert],
|