lauro1 commited on
Commit
616d63f
β€’
1 Parent(s): 2073913
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  from blindbox.requests import SecureSession
3
 
4
  DEMO_SERVER = "4.208.9.167:80"
 
5
  bullets = "<ul><li style='color: white;'>βœ… Connection verified by attestation</li><li style='color: white;'>βœ… Application deployed on Confidential VM</li></ul><p style='color: white;'>Features coming soon:</p><ul><li style='color: white;'>βŒ› TLS</li><li style='color: white;'>βŒ› Network isolation</li></ul>"
6
 
7
  def run_query( server, prompt):
@@ -20,13 +21,10 @@ def run_query( server, prompt):
20
  except Exception as err:
21
  return(f"β›” Query failed!\n{err}")
22
 
23
- with gr.Blocks(css=".gradio-container {background-color: #20233fff;}") as demo:
24
- gr.Markdown("<h1 style='text-align: center; color: white;'>πŸŽ… SantaCoder with <span style='color: #f0ba2d;'>BlindBox:</span> Private Code Generation </h1>")
25
- gr.Markdown("<p style='text-align: left; color: white;'>This is our demo for our <a style='color: #f0ba2d;', href='https://blog-mithril-security.ghost.io/ai-assisted-code-generation-with-privacy-guarantees-securely-deploy-santacoder-with-blindbox'>article</a> on deploying code generation LLM models with BlindBox. The user input is <a style='color: #f0ba2d;', href='https://blindbox.mithrilsecurity.io/en/latest/docs/getting-started/confidential_computing/'>protected during computation.</a></p>")
26
- gr.Markdown("<p style='text-align: left; color: white;'>You can see how we deployed the model in the integration section of our <a style='color: #f0ba2d;', href='https://blindbox.mithrilsecurity.io/en/latest/docs/how-to-guides/santacoder/'>documentation!</a></p>")
27
- gr.Markdown("<p style='text-align: left; color: white;'>⚠️ BlindBox is still under development. Do not test with production data!</p>")
28
  gr.Markdown(value=bullets)
29
-
30
  _, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
31
  with colum_2:
32
  prompt = gr.Code(lines=3, language="python", label="Input code", value="def hello_name(name):")
 
2
  from blindbox.requests import SecureSession
3
 
4
  DEMO_SERVER = "4.208.9.167:80"
5
+ text = "<h1 style='text-align: center; color: white;'>πŸŽ… SantaCoder with <span style='color: #f0ba2d;'>BlindBox:</span> Private Code Generation </h1><p style='text-align: left; color: white;'>This is our demo for our <a style='color: #f0ba2d;', href='https://blog-mithril-security.ghost.io/ai-assisted-code-generation-with-privacy-guarantees-securely-deploy-santacoder-with-blindbox'>article</a> on deploying code generation LLM models with BlindBox. The user input is <a style='color: #f0ba2d;', href='https://blindbox.mithrilsecurity.io/en/latest/docs/getting-started/confidential_computing/'>protected during computation</a> by leveraging state-of-the-art <a style='color: #f0ba2d;', href='https://www.ibm.com/topics/confidential-computing'> Confidental Computing technologies.</a> This means that data sent to Santacoder model is never accessible to the service provider during computation- private code remains private!</p><p style='text-align: left; color: white;'>You can see how we deployed the model in the integration section of our <a style='color: #f0ba2d;', href='https://blindbox.mithrilsecurity.io/en/latest/docs/how-to-guides/santacoder/'>documentation!</a></p><p style='text-align: left; color: white;'>⚠️ BlindBox is still under development. Do not test with production data!</p>"
6
  bullets = "<ul><li style='color: white;'>βœ… Connection verified by attestation</li><li style='color: white;'>βœ… Application deployed on Confidential VM</li></ul><p style='color: white;'>Features coming soon:</p><ul><li style='color: white;'>βŒ› TLS</li><li style='color: white;'>βŒ› Network isolation</li></ul>"
7
 
8
  def run_query( server, prompt):
 
21
  except Exception as err:
22
  return(f"β›” Query failed!\n{err}")
23
 
24
+ demo = gr.Blocks(css=".gradio-container { background-color: #20233fff;} .app.svelte-1mya07g.svelte-1mya07g {max-width: 1100px !important;}")
25
+ with demo:
26
+ gr.Markdown(value=text)
 
 
27
  gr.Markdown(value=bullets)
 
28
  _, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
29
  with colum_2:
30
  prompt = gr.Code(lines=3, language="python", label="Input code", value="def hello_name(name):")