mirror of
https://github.com/sd-webui/stable-diffusion-webui.git
synced 2024-12-15 07:12:58 +03:00
f630ee5c90
fixed drag being blocked by "press enter to apply" text.
11 lines
381 B
Python
11 lines
381 B
Python
import os
|
|
import streamlit.components.v1 as components
|
|
|
|
def load(pixel_per_step = 50):
|
|
parent_dir = os.path.dirname(os.path.abspath(__file__))
|
|
file = os.path.join(parent_dir, "main.js")
|
|
|
|
with open(file) as f:
|
|
javascript_main = f.read()
|
|
javascript_main = javascript_main.replace("%%pixelPerStep%%",str(pixel_per_step))
|
|
components.html(f"<script>{javascript_main}</script>") |