VaultChem commited on
Commit
9c9bf43
·
verified ·
1 Parent(s): cfe6b50

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -49
app.py CHANGED
@@ -192,58 +192,20 @@ def process_pipeline(test_file):
192
  return eval_key, encodings, encrypted_quantized_encoding, encrypted_prediction
193
 
194
  if __name__ == "__main__":
195
- """
196
- with gr.Blocks() as demo:
197
- print("Starting the FHE Model")
198
 
199
- inputs = [gr.File(label="Test File")]
200
- outputs = [
 
 
 
 
201
  gr.Textbox(label="Evaluation Key"),
202
  gr.Textbox(label="Encodings"),
203
  gr.Textbox(label="Encrypted Quantized Encoding"),
204
  gr.Textbox(label="Encrypted Prediction"),
205
- ]
206
-
207
- run_bottn = gr.Button(label="Run")
208
-
209
- run_bottn.click(
210
- fn=process_pipeline, # Pass process_pipeline directly
211
- inputs=inputs,
212
- outputs=outputs
213
- )
214
-
215
- demo.launch()
216
-
217
-
218
- """
219
- with gr.Blocks() as demo:
220
- print("Starting the FHE Model")
221
-
222
-
223
- inputs = (
224
- [
225
- gr.File(label="Test File"),
226
- ],
227
- )
228
- outputs = (
229
- [
230
- gr.Textbox(label="Evaluation Key"),
231
- gr.Textbox(label="Encodings"),
232
- gr.Textbox(label="Encrypted Quantized Encoding"),
233
- gr.Textbox(label="Encrypted Prediction"),
234
- ],
235
- )
236
- title = ("FHE Model",)
237
- description = ("This is a FHE Model",)
238
-
239
- #gr.Interface(fn, inputs, outputs, title=title, description=description).launch()
240
-
241
- run_bottn = gr.Button("Run")
242
-
243
- run_bottn.click(
244
- fn=(process_pipeline,),
245
- inputs=inputs, outputs=outputs
246
- )
247
-
248
 
249
- demo.launch() #share=True)
 
192
  return eval_key, encodings, encrypted_quantized_encoding, encrypted_prediction
193
 
194
  if __name__ == "__main__":
 
 
 
195
 
196
+ app = gr.Interface(
197
+ fn=process_pipeline,
198
+ inputs=[
199
+ gr.File(label="Test File"),
200
+ ],
201
+ outputs=[
202
  gr.Textbox(label="Evaluation Key"),
203
  gr.Textbox(label="Encodings"),
204
  gr.Textbox(label="Encrypted Quantized Encoding"),
205
  gr.Textbox(label="Encrypted Prediction"),
206
+ ],
207
+ title="FHE Model",
208
+ description="This is a FHE Model",
209
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
+ app.launch() # share=True)