mirror of
https://github.com/nod-ai/SHARK-Studio.git
synced 2026-01-09 13:57:54 -05:00
[WEB] Add pillow dependency (#453)
Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com> Signed-off-by: Gaurav Shukla <gaurav@nod-labs.com>
This commit is contained in:
@@ -35,6 +35,6 @@ pip install --pre torch-mlir torch torchvision --extra-index-url https://downloa
|
||||
pip install --upgrade -f https://nod-ai.github.io/SHARK-Runtime/pip-release-links.html iree-compiler iree-runtime
|
||||
Write-Host "Building SHARK..."
|
||||
pip install -e . -f https://llvm.github.io/torch-mlir/package-index/ -f https://nod-ai.github.io/SHARK-Runtime/pip-release-links.html
|
||||
pip install diffusers transformers scipy gradio
|
||||
pip install diffusers transformers scipy pillow gradio
|
||||
Write-Host "Build and installation completed successfully"
|
||||
Write-Host "Source your venv with ./shark.venv/Scripts/activate"
|
||||
|
||||
31
web/index.py
31
web/index.py
@@ -1,8 +1,8 @@
|
||||
from models.resnet50 import resnet_inf
|
||||
from models.albert_maskfill import albert_maskfill_inf
|
||||
# from models.resnet50 import resnet_inf
|
||||
# from models.albert_maskfill import albert_maskfill_inf
|
||||
from models.stable_diffusion.main import stable_diff_inf
|
||||
|
||||
# from models.diffusion.v_diffusion import vdiff_inf
|
||||
# from models.diffusion.v_diffusion import vdiff_inf
|
||||
import gradio as gr
|
||||
from PIL import Image
|
||||
|
||||
@@ -204,23 +204,26 @@ with gr.Blocks() as shark_web:
|
||||
width = gr.Slider(
|
||||
384, 768, value=512, step=64, label="Width"
|
||||
)
|
||||
with gr.Row():
|
||||
precision = gr.Radio(
|
||||
label="Precision",
|
||||
value="fp32",
|
||||
choices=["fp16", "fp32"],
|
||||
)
|
||||
device = gr.Radio(
|
||||
label="Device",
|
||||
value="vulkan",
|
||||
choices=["cpu", "cuda", "vulkan"],
|
||||
)
|
||||
with gr.Row():
|
||||
scheduler = gr.Radio(
|
||||
label="Scheduler",
|
||||
value="LMS",
|
||||
choices=["PNDM", "LMS", "DDIM"],
|
||||
interactive=False,
|
||||
visible=False,
|
||||
)
|
||||
device = gr.Radio(
|
||||
label="Device",
|
||||
value="vulkan",
|
||||
choices=["cpu", "cuda", "vulkan"],
|
||||
interactive=False,
|
||||
visible=False,
|
||||
)
|
||||
with gr.Row():
|
||||
precision = gr.Radio(
|
||||
label="Precision",
|
||||
value="fp32",
|
||||
choices=["fp16", "fp32"],
|
||||
)
|
||||
seed = gr.Textbox(
|
||||
value="42", max_lines=1, label="Seed"
|
||||
|
||||
Reference in New Issue
Block a user