cryptocalypse commited on
Commit
4de5904
1 Parent(s): 70634a2
Files changed (1) hide show
  1. app.py +96 -96
app.py CHANGED
@@ -104,7 +104,7 @@ with gr.Blocks(title="Sophia, Torah Codes") as app:
104
  undo_btn="Undo",
105
  clear_btn="Clear",
106
  )
107
- with gr.Row():
108
  #with gr.Tab("Chat"):
109
  # chatBot = gr.ChatInterface(
110
  # respond,
@@ -112,101 +112,101 @@ with gr.Blocks(title="Sophia, Torah Codes") as app:
112
  # undo_btn="Undo",
113
  # clear_btn="Clear",
114
  # )
115
- with gr.Tab("ELS"):
116
- with gr.Row():
117
- books_sel = gr.CheckboxGroup(booklist,value=booklist, label="Books", info="Torah books source")
118
- with gr.Row():
119
- to_convert = gr.Textbox(value="Alber Einstein 14 March 1879",label="Prompt to gematria conversion for apply ELS",scale=3)
120
- langgem=gr.Dropdown(
121
- ["Hebrew", "Latin", "Greek"],value="Latin", label="Gematria Alphabet", info="Choose gematria conversion"
122
- ),
123
- with gr.Row():
124
- spaces_include = gr.Checkbox(label="Include Spaces", value=False)
125
- strip_in_braces = gr.Checkbox(label="Strip Text in Braces", value=True)
126
- strip_diacritics_chk = gr.Checkbox(label="Strip Diacritics", value=True)
127
- to_jump = gr.Textbox(label="ELS value", scale=1)
128
- with gr.Row():
129
- search_els = gr.Button("Search",scale=1)
130
- with gr.Row():
131
- els_results = gr.JSON(label="Results")
132
- search_els.click(
133
- els_book,
134
- inputs=[to_convert,to_convert],
135
- outputs=els_results
136
- )
137
-
138
-
139
- with gr.Tab("Gematria"):
140
- with gr.Row():
141
- gr.Markdown("## Calculate Gematria Sum")
142
- with gr.Row():
143
- gematria_text = gr.Textbox(label="Enter Text",scale=4)
144
- gematria_btn = gr.Button("Calculate Sum",scale=1)
145
- with gr.Row():
146
- gematria_result = gr.Number(label="Gematria Sum")
147
- gematria_btn.click(
148
- gematria_sum,
149
- inputs=gematria_text,
150
- outputs=gematria_result
151
- )
152
-
153
- with gr.Tab("Temurae"):
154
- with gr.Row():
155
- text_temur = gr.Textbox(label="Text to encode with Temurah / Atbash algorihm",scale=3)
156
- langte=gr.Dropdown(
157
- ["Hebrew", "Latin", "Greek"],value="Latin", label="Temurah Alphabet", info="Choose Alphabet"
158
- )
159
-
160
- temurae_btn = gr.Button("Convert",scale=1)
161
- with gr.Row():
162
- temurae_result = gr.Textbox(label="Results")
163
-
164
- temurae_btn.click(
165
- temurae,
166
- inputs=[text_temur,text_temur],
167
- outputs=temurae_result
168
- )
169
-
170
-
171
-
172
- with gr.Tab("Ziruph"):
173
- with gr.Row():
174
- zir_text = gr.Textbox(label="Text to encode with Ziruph / Atbash algorihm",scale=3)
175
- dictionary_zir=gr.Dropdown(
176
- ["Kircher", "Random", "Custom"],value="Latin", label="Ziruph Dictionary", info="Choose ziruph dictionary"
177
- )
178
- custom_dic= 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)
179
- zir_btn = gr.Button("Encrypt",scale=1)
180
- with gr.Row():
181
- zir_result = gr.Textbox(label="Results")
182
-
183
- zir_btn.click(
184
- ziruph,
185
- inputs=[zir_text,custom_dic],
186
- outputs=zir_result
187
- )
188
- with gr.Row():
189
- zir_text2 = gr.Textbox(label="Text to dencode with Ziruph / Atbash algorihm",scale=3)
190
- dictionary_zir2=gr.Dropdown(
191
- ["Kircher", "Random", "Custom"],value="Latin", label="Ziruph Dictionary", info="Choose ziruph dictionary"
192
- )
193
- 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)
194
- zir_btn2 = gr.Button("Decrypt",scale=1)
195
- with gr.Row():
196
- zir_result2 = gr.Textbox(label="Results")
197
-
198
- zir_btn2.click(
199
- ziruph_dec,
200
- inputs=[zir_text2,custom_dic2],
201
- outputs=zir_result2
202
- )
203
-
204
-
205
- with gr.Tab("Files"):
206
- with gr.Row():
207
- image_input = gr.Image()
208
- image_output = gr.Image()
209
- image_button = gr.Button("Upload")
210
 
211
 
212
 
 
104
  undo_btn="Undo",
105
  clear_btn="Clear",
106
  )
107
+
108
  #with gr.Tab("Chat"):
109
  # chatBot = gr.ChatInterface(
110
  # respond,
 
112
  # undo_btn="Undo",
113
  # clear_btn="Clear",
114
  # )
115
+ with gr.Tab("ELS"):
116
+ with gr.Row():
117
+ books_sel = gr.CheckboxGroup(booklist,value=booklist, label="Books", info="Torah books source")
118
+ with gr.Row():
119
+ to_convert = gr.Textbox(value="Alber Einstein 14 March 1879",label="Prompt to gematria conversion for apply ELS",scale=3)
120
+ langgem=gr.Dropdown(
121
+ ["Hebrew", "Latin", "Greek"],value="Latin", label="Gematria Alphabet", info="Choose gematria conversion"
122
+ ),
123
+ with gr.Row():
124
+ spaces_include = gr.Checkbox(label="Include Spaces", value=False)
125
+ strip_in_braces = gr.Checkbox(label="Strip Text in Braces", value=True)
126
+ strip_diacritics_chk = gr.Checkbox(label="Strip Diacritics", value=True)
127
+ to_jump = gr.Textbox(label="ELS value", scale=1)
128
+ with gr.Row():
129
+ search_els = gr.Button("Search",scale=1)
130
+ with gr.Row():
131
+ els_results = gr.JSON(label="Results")
132
+ search_els.click(
133
+ els_book,
134
+ inputs=[to_convert,to_convert],
135
+ outputs=els_results
136
+ )
137
+
138
+
139
+ with gr.Tab("Gematria"):
140
+ with gr.Row():
141
+ gr.Markdown("## Calculate Gematria Sum")
142
+ with gr.Row():
143
+ gematria_text = gr.Textbox(label="Enter Text",scale=4)
144
+ gematria_btn = gr.Button("Calculate Sum",scale=1)
145
+ with gr.Row():
146
+ gematria_result = gr.Number(label="Gematria Sum")
147
+ gematria_btn.click(
148
+ gematria_sum,
149
+ inputs=gematria_text,
150
+ outputs=gematria_result
151
+ )
152
+
153
+ with gr.Tab("Temurae"):
154
+ with gr.Row():
155
+ text_temur = gr.Textbox(label="Text to encode with Temurah / Atbash algorihm",scale=3)
156
+ langte=gr.Dropdown(
157
+ ["Hebrew", "Latin", "Greek"],value="Latin", label="Temurah Alphabet", info="Choose Alphabet"
158
+ )
159
+
160
+ temurae_btn = gr.Button("Convert",scale=1)
161
+ with gr.Row():
162
+ temurae_result = gr.Textbox(label="Results")
163
+
164
+ temurae_btn.click(
165
+ temurae,
166
+ inputs=[text_temur,text_temur],
167
+ outputs=temurae_result
168
+ )
169
+
170
+
171
+
172
+ with gr.Tab("Ziruph"):
173
+ with gr.Row():
174
+ zir_text = gr.Textbox(label="Text to encode with Ziruph / Atbash algorihm",scale=3)
175
+ dictionary_zir=gr.Dropdown(
176
+ ["Kircher", "Random", "Custom"],value="Latin", label="Ziruph Dictionary", info="Choose ziruph dictionary"
177
+ )
178
+ custom_dic= 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)
179
+ zir_btn = gr.Button("Encrypt",scale=1)
180
+ with gr.Row():
181
+ zir_result = gr.Textbox(label="Results")
182
+
183
+ zir_btn.click(
184
+ ziruph,
185
+ inputs=[zir_text,custom_dic],
186
+ outputs=zir_result
187
+ )
188
+ with gr.Row():
189
+ zir_text2 = gr.Textbox(label="Text to dencode with Ziruph / Atbash algorihm",scale=3)
190
+ dictionary_zir2=gr.Dropdown(
191
+ ["Kircher", "Random", "Custom"],value="Latin", label="Ziruph Dictionary", info="Choose ziruph dictionary"
192
+ )
193
+ 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)
194
+ zir_btn2 = gr.Button("Decrypt",scale=1)
195
+ with gr.Row():
196
+ zir_result2 = gr.Textbox(label="Results")
197
+
198
+ zir_btn2.click(
199
+ ziruph_dec,
200
+ inputs=[zir_text2,custom_dic2],
201
+ outputs=zir_result2
202
+ )
203
+
204
+
205
+ with gr.Tab("Files"):
206
+ with gr.Row():
207
+ image_input = gr.Image()
208
+ image_output = gr.Image()
209
+ image_button = gr.Button("Upload")
210
 
211
 
212