Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,17 +6,17 @@ def load_config():
|
|
| 6 |
with open('config.json', 'r') as f:
|
| 7 |
return json.load(f)
|
| 8 |
|
| 9 |
-
def
|
| 10 |
-
st.
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
| 21 |
default_params = config["default_parameters"]
|
| 22 |
|
|
@@ -39,7 +39,7 @@ def get_user_input(config):
|
|
| 39 |
|
| 40 |
# Camera Properties
|
| 41 |
camera_enabled = checkbox_with_default("Enable Camera Configuration", True)
|
| 42 |
-
camera_interpolation_enabled = checkbox_with_default("Enable Camera Interpolation",
|
| 43 |
|
| 44 |
# Lighting Properties
|
| 45 |
lighting_enabled = checkbox_with_default("Enable Lighting Configuration", True)
|
|
|
|
| 6 |
with open('config.json', 'r') as f:
|
| 7 |
return json.load(f)
|
| 8 |
|
| 9 |
+
def checkbox_with_default(label, value):
|
| 10 |
+
return st.checkbox(label, value=value)
|
| 11 |
|
| 12 |
+
def text_input_with_default(label, value):
|
| 13 |
+
return st.text_input(label, value)
|
| 14 |
|
| 15 |
+
def selectbox_with_default(label, options, value):
|
| 16 |
+
return st.selectbox(label, options, index=options.index(value))
|
| 17 |
|
| 18 |
+
def get_user_input(config):
|
| 19 |
+
st.title("Advanced Roblox Lua Script Generator")
|
| 20 |
|
| 21 |
default_params = config["default_parameters"]
|
| 22 |
|
|
|
|
| 39 |
|
| 40 |
# Camera Properties
|
| 41 |
camera_enabled = checkbox_with_default("Enable Camera Configuration", True)
|
| 42 |
+
camera_interpolation_enabled = checkbox_with_default("Enable Camera Interpolation", default_params["camera_interpolation"])
|
| 43 |
|
| 44 |
# Lighting Properties
|
| 45 |
lighting_enabled = checkbox_with_default("Enable Lighting Configuration", True)
|