Spaces:
Runtime error
Runtime error
Commit
·
ba5f2b9
1
Parent(s):
d7992f6
ziruph
Browse files
app.py
CHANGED
|
@@ -38,6 +38,9 @@ def ziruph(dic,text):
|
|
| 38 |
|
| 39 |
return encrypt(text,dic)
|
| 40 |
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
def gematria_sum(text):
|
| 43 |
els_space = torah.gematria_sum(text)
|
|
@@ -146,7 +149,7 @@ with gr.Blocks(title="Sophia, Torah Codes") as demo:
|
|
| 146 |
text_temur = gr.Textbox(label="Text to encode with Temurah / Atbash algorihm",scale=3)
|
| 147 |
langte=gr.Dropdown(
|
| 148 |
["Hebrew", "Latin", "Greek"],value="Latin", label="Temurah Alphabet", info="Choose Alphabet"
|
| 149 |
-
)
|
| 150 |
|
| 151 |
temurae_btn = gr.Button("Convert",scale=1)
|
| 152 |
with gr.Row():
|
|
@@ -162,11 +165,11 @@ with gr.Blocks(title="Sophia, Torah Codes") as demo:
|
|
| 162 |
|
| 163 |
with gr.Tab("Ziruph"):
|
| 164 |
with gr.Row():
|
| 165 |
-
zir_text = gr.Textbox(label="Text to encode with
|
| 166 |
dictionary_zir=gr.Dropdown(
|
| 167 |
-
["Kircher", "Random", "Custom"],value="Latin",
|
| 168 |
-
)
|
| 169 |
-
|
| 170 |
zir_btn = gr.Button("Encrypt",scale=1)
|
| 171 |
with gr.Row():
|
| 172 |
zir_result = gr.Textbox(label="Results")
|
|
@@ -176,6 +179,22 @@ with gr.Blocks(title="Sophia, Torah Codes") as demo:
|
|
| 176 |
inputs=[zir_text,custom_dic],
|
| 177 |
outputs=zir_result
|
| 178 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
|
| 180 |
with gr.Tab("Files"):
|
| 181 |
with gr.Row():
|
|
|
|
| 38 |
|
| 39 |
return encrypt(text,dic)
|
| 40 |
|
| 41 |
+
def ziruph_dec(dic,text):
|
| 42 |
+
|
| 43 |
+
return decrypt(text,dic)
|
| 44 |
|
| 45 |
def gematria_sum(text):
|
| 46 |
els_space = torah.gematria_sum(text)
|
|
|
|
| 149 |
text_temur = gr.Textbox(label="Text to encode with Temurah / Atbash algorihm",scale=3)
|
| 150 |
langte=gr.Dropdown(
|
| 151 |
["Hebrew", "Latin", "Greek"],value="Latin", label="Temurah Alphabet", info="Choose Alphabet"
|
| 152 |
+
)
|
| 153 |
|
| 154 |
temurae_btn = gr.Button("Convert",scale=1)
|
| 155 |
with gr.Row():
|
|
|
|
| 165 |
|
| 166 |
with gr.Tab("Ziruph"):
|
| 167 |
with gr.Row():
|
| 168 |
+
zir_text = gr.Textbox(label="Text to encode with Ziruph / Atbash algorihm",scale=3)
|
| 169 |
dictionary_zir=gr.Dropdown(
|
| 170 |
+
["Kircher", "Random", "Custom"],value="Latin", label="Ziruph Dictionary", info="Choose ziruph dictionary"
|
| 171 |
+
)
|
| 172 |
+
gr.Textbox(value="C X Y B W P R V Q J Z M N T K E L D F G H I O U S",label="Custom Dictionary",scale=3)
|
| 173 |
zir_btn = gr.Button("Encrypt",scale=1)
|
| 174 |
with gr.Row():
|
| 175 |
zir_result = gr.Textbox(label="Results")
|
|
|
|
| 179 |
inputs=[zir_text,custom_dic],
|
| 180 |
outputs=zir_result
|
| 181 |
)
|
| 182 |
+
with gr.Row():
|
| 183 |
+
zir_text2 = gr.Textbox(label="Text to dencode with Ziruph / Atbash algorihm",scale=3)
|
| 184 |
+
dictionary_zir2=gr.Dropdown(
|
| 185 |
+
["Kircher", "Random", "Custom"],value="Latin", label="Ziruph Dictionary", info="Choose ziruph dictionary"
|
| 186 |
+
)
|
| 187 |
+
custom_dic2 = gr.Textbox(value="C X Y B W P R V Q J Z M N T K E L D F G H I O U S",label="Custom Dictionary",scale=3)
|
| 188 |
+
zir_btn2 = gr.Button("Decrypt",scale=1)
|
| 189 |
+
with gr.Row():
|
| 190 |
+
zir_result2 = gr.Textbox(label="Results")
|
| 191 |
+
|
| 192 |
+
zir_btn2.click(
|
| 193 |
+
ziruph_dec,
|
| 194 |
+
inputs=[zir_text2,custom_dic2],
|
| 195 |
+
outputs=zir_result2
|
| 196 |
+
)
|
| 197 |
+
|
| 198 |
|
| 199 |
with gr.Tab("Files"):
|
| 200 |
with gr.Row():
|