Spaces:
Running
Running
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Gradio-Lite: Serverless Gradio Running Entirely in Your Browser</title> | |
| <meta name="description" content="Gradio-Lite: Serverless Gradio Running Entirely in Your Browser"> | |
| <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.js"></script> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.css" /> | |
| <style> | |
| html, body { | |
| margin: 0; | |
| padding: 0; | |
| height: 100%; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <gradio-lite> | |
| <gradio-file name="app.py" entrypoint> | |
| import gradio as gr | |
| def welcome(name): | |
| return f"Welcome to Gradio, {name}!" | |
| with gr.Blocks() as demo: | |
| gr.Markdown( | |
| """ | |
| # TITAN Project | |
| Provide the GitHub repository link to retrieve the top x most potentially vulnerable functions. | |
| """) | |
| inp = gr.Textbox(placeholder="e.g., https://github.com/TitanCAProject/JIT-Vul-manualcheck", label="GitHub Repo Link") | |
| age_box = gr.Number(label="Top suspicious functions", minimum=3, maximum=100) | |
| submit_btn = gr.Button("Submit") | |
| out = gr.Textbox(label="Results") | |
| inp.change(welcome, inp, out) | |
| demo.launch() | |
| </gradio-file> | |
| <gradio-file name="filters.py"> | |
| from skimage.color import rgb2gray | |
| def as_gray(image): | |
| return rgb2gray(image) | |
| </gradio-file> | |
| <gradio-file name="lion.jpg" url="https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/test_data/lion.jpg" /> | |
| <gradio-file name="logo.png" url="https://raw.githubusercontent.com/gradio-app/gradio/main/guides/assets/logo.png" /> | |
| <gradio-requirements> | |
| # Same syntax as requirements.txt | |
| scikit-image | |
| </gradio-requirements> | |
| </gradio-lite> | |
| </body> | |
| </html> |