Spaces:
Sleeping
Sleeping
cryptocalypse
commited on
Commit
•
9862b06
1
Parent(s):
08373de
temurae
Browse files- app.py +27 -9
- lib/temuraeh.py +13 -29
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
from lib.gematria import calculate_gematria, strip_diacritics
|
|
|
4 |
#import lib.torah as torah
|
5 |
|
6 |
from torahcodes.resources.func.torah import *
|
@@ -25,14 +26,20 @@ def els_book(book_num,prompt):
|
|
25 |
|
26 |
return res
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
32 |
|
33 |
def gematria_sum(text):
|
|
|
|
|
|
|
|
|
34 |
# Berechnet die Gematria-Summe für den eingegebenen Text
|
35 |
-
return
|
36 |
|
37 |
|
38 |
"""
|
@@ -130,10 +137,21 @@ with gr.Blocks(title="Sophia, Torah Codes") as demo:
|
|
130 |
|
131 |
with gr.Tab("Temurae"):
|
132 |
with gr.Row():
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
with gr.Tab("Ziruph"):
|
139 |
with gr.Row():
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
from lib.gematria import calculate_gematria, strip_diacritics
|
4 |
+
from lib.temuraeh import temura_conv
|
5 |
#import lib.torah as torah
|
6 |
|
7 |
from torahcodes.resources.func.torah import *
|
|
|
26 |
|
27 |
return res
|
28 |
|
29 |
+
def termurae(textA,lang):
|
30 |
+
|
31 |
+
return temura_conv(textA,lang)
|
32 |
+
|
33 |
+
def ziruph(dic,text):
|
34 |
+
|
35 |
|
36 |
def gematria_sum(text):
|
37 |
+
els_space = torah.gematria_sum(text)
|
38 |
+
if els_space==0:
|
39 |
+
els_space=torah.gematria(prompt)
|
40 |
+
|
41 |
# Berechnet die Gematria-Summe für den eingegebenen Text
|
42 |
+
return text
|
43 |
|
44 |
|
45 |
"""
|
|
|
137 |
|
138 |
with gr.Tab("Temurae"):
|
139 |
with gr.Row():
|
140 |
+
text_temur = gr.Textbox(label="Text to encode with Temurah / Atbash algorihm",scale=3)
|
141 |
+
langte=gr.Dropdown(
|
142 |
+
["Hebrew", "Latin", "Greek"],value="Latin", label="Gematria Alphabet", info="Choose gematria conversion"
|
143 |
+
),
|
144 |
+
|
145 |
+
temurae_btn = gr.Button("Convert",scale=1)
|
146 |
+
temurae_btn.click(
|
147 |
+
temurae,
|
148 |
+
inputs=[text_temur,langte]
|
149 |
+
outputs=temurae_result
|
150 |
+
)
|
151 |
+
|
152 |
+
with gr.Row():
|
153 |
+
temurae_result = gr.JSON(label="Results")
|
154 |
+
|
155 |
|
156 |
with gr.Tab("Ziruph"):
|
157 |
with gr.Row():
|
lib/temuraeh.py
CHANGED
@@ -26,34 +26,18 @@ def temurah(text, hebrew_alphabet='אבגדהוזחטיכלמנסעפצקרשת'
|
|
26 |
|
27 |
# Definir el alfabeto hebreo
|
28 |
hebrew_alphabet = 'אבגדהוזחטיכלמנסעפצקרשת'
|
|
|
29 |
|
30 |
-
# Texto de ejemplo: "Baphomet" y "Sofia" en hebreo
|
31 |
-
# Es importante notar que la transliteración directa de nombres propios o términos específicos entre idiomas
|
32 |
-
# puede no ser directa o puede requerir ajustes basados en la fonética o el uso histórico.
|
33 |
-
|
34 |
-
# Por simplificación, supongamos transliteraciones hipotéticas para "Baphomet" a "Sofia":
|
35 |
-
# Estas transliteraciones son ejemplos y pueden no reflejar transliteraciones precisas.
|
36 |
-
baphomet_hebrew = 'בפומת' # Esta es una transliteración hipotética para "Baphomet"
|
37 |
-
sofia_hebrew = 'סופיא' # Esta es una transliteración hipotética para "Sofia"
|
38 |
-
|
39 |
-
|
40 |
-
jesus ="ישוע"
|
41 |
-
christ = ""
|
42 |
-
|
43 |
-
print(temurah(jesus,hebrew_alphabet))
|
44 |
-
# Aplicar temurah al texto hipotético de "Baphomet"
|
45 |
-
temurah_baphomet = temurah(baphomet_hebrew, hebrew_alphabet)
|
46 |
-
|
47 |
-
# Mostrar resultados
|
48 |
-
|
49 |
-
print(temurah_baphomet+"\n"+sofia_hebrew)
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
genesis = json.loads(open("genesis.json","r").read())["text"][0]
|
55 |
-
|
56 |
-
##example_text = "בראשית ברא אלהים את השמים ואת הארץ" # "En el principio Dios creó los cielos y la tierra."
|
57 |
-
#for txt in genesis:
|
58 |
-
# print(temurah(txt,hebrew_alphabet))
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
# Definir el alfabeto hebreo
|
28 |
hebrew_alphabet = 'אבגדהוזחטיכלמנסעפצקרשת'
|
29 |
+
latin_alphabet = 'abcdefghijklmnopqrstuvwxyz'
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
+
def temura_conv(txt,lang):
|
33 |
+
if lang="hebrew":
|
34 |
+
alphabet = hebrew_alphabet
|
35 |
+
elif lang=="latin":
|
36 |
+
alphabet= latin_alphabet
|
37 |
+
else:
|
38 |
+
alphabet=latin_alphabet
|
39 |
+
|
40 |
+
res = temurah(txt,alphabet)
|
41 |
+
# Aplicar temurah al texto hipotético de "Baphomet"
|
42 |
+
return res
|
43 |
+
|