Spaces:
Runtime error
Runtime error
simplified gradio
Browse files- app.py +5 -5
- hello_world.txt +0 -1
app.py
CHANGED
@@ -3,10 +3,10 @@ from blindbox.requests import SecureSession
|
|
3 |
|
4 |
DEMO_SERVER = "4.208.9.167:80"
|
5 |
|
6 |
-
def run_query( server,
|
7 |
-
if prompt == None or server == None
|
8 |
return("β Error: please select an option for stages 1 and 2")
|
9 |
-
if len(prompt) == 0 or len(
|
10 |
return("β Error: please select an option for stages 1-3")
|
11 |
if server != "Authentic and verified confidential VM server":
|
12 |
return ("β Error: you can only connect to an application running on a Confidential VM")
|
@@ -26,7 +26,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
26 |
gr.Markdown("<p>The model is deployed within a highly-isolated Trusted Execution Environment, meaning that we, as the service provider, have no access to the data sent to this model!</p>")
|
27 |
gr.Markdown("<p>You can see how we deployed the model by checking out the integration section of our <a href='https://blindbox.mithrilsecurity.io/en/latest/docs/how-to-guides/santacoder/'>documentation!</p>")
|
28 |
gr.Markdown("><h3>Step 1: Check that we are connecting to an authentic confidential VM")
|
29 |
-
gr.Markdown("<p>This first option allows you to choose whether to connect to the Santacoder application deployed with BlindBox on a verified confidential VM or the same application deployed on a dummy server which is not within a confidential VM
|
30 |
with gr.Column():
|
31 |
server = gr.Radio(
|
32 |
["Authentic and verified confidential VM server", "Unauthentic dummy server"], label="Select the server you want to connect to"
|
@@ -42,7 +42,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
42 |
trigger = gr.Button("Test query")
|
43 |
with gr.Column():
|
44 |
output = gr.Textbox(placeholder="Output", label="See the output of your query here")
|
45 |
-
trigger.click(fn=run_query, inputs=[server,
|
46 |
|
47 |
if __name__ == "__main__":
|
48 |
demo.launch()
|
|
|
3 |
|
4 |
DEMO_SERVER = "4.208.9.167:80"
|
5 |
|
6 |
+
def run_query( server, prompt):
|
7 |
+
if prompt == None or server == None:
|
8 |
return("β Error: please select an option for stages 1 and 2")
|
9 |
+
if len(prompt) == 0 or len(server) == 0:
|
10 |
return("β Error: please select an option for stages 1-3")
|
11 |
if server != "Authentic and verified confidential VM server":
|
12 |
return ("β Error: you can only connect to an application running on a Confidential VM")
|
|
|
26 |
gr.Markdown("<p>The model is deployed within a highly-isolated Trusted Execution Environment, meaning that we, as the service provider, have no access to the data sent to this model!</p>")
|
27 |
gr.Markdown("<p>You can see how we deployed the model by checking out the integration section of our <a href='https://blindbox.mithrilsecurity.io/en/latest/docs/how-to-guides/santacoder/'>documentation!</p>")
|
28 |
gr.Markdown("><h3>Step 1: Check that we are connecting to an authentic confidential VM")
|
29 |
+
gr.Markdown("<p>This first option allows you to choose whether to connect to the Santacoder application deployed with BlindBox on a verified confidential VM or the same application deployed on a dummy server which is not within a confidential VM. This demonstrates how BlindBox blocks requests to non-authentic confidential VMs!</p>")
|
30 |
with gr.Column():
|
31 |
server = gr.Radio(
|
32 |
["Authentic and verified confidential VM server", "Unauthentic dummy server"], label="Select the server you want to connect to"
|
|
|
42 |
trigger = gr.Button("Test query")
|
43 |
with gr.Column():
|
44 |
output = gr.Textbox(placeholder="Output", label="See the output of your query here")
|
45 |
+
trigger.click(fn=run_query, inputs=[server, prompt], outputs=output)
|
46 |
|
47 |
if __name__ == "__main__":
|
48 |
demo.launch()
|
hello_world.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
cGFja2FnZSBwb2xpY3kKCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKaW1wb3J0IGZ1dHVyZS5rZXl3b3Jkcy5pbgoKYXBpX3N2biA6PSAiMC4xMC4wIgpmcmFtZXdvcmtfc3ZuIDo9ICIwLjEuMCIKCmZyYWdtZW50cyA6PSBbCiAgewogICAgImZlZWQiOiAibWNyLm1pY3Jvc29mdC5jb20vYWNpL2FjaS1jYy1pbmZyYS1mcmFnbWVudCIsCiAgICAiaW5jbHVkZXMiOiBbCiAgICAgICJjb250YWluZXJzIgogICAgXSwKICAgICJpc3N1ZXIiOiAiZGlkOng1MDk6M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