Skip to content

Commit

Permalink
fix(app.py): fix rhino integration
Browse files Browse the repository at this point in the history
  • Loading branch information
devangcx committed May 31, 2022
1 parent 7170243 commit 292d45b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from helper import generate_3d_model, add_viewer

url='https://huggingface.co/gradioiframe/architext/Architext_deployed/api/predict/'
url = 'https://huggingface.co/gradioiframe/architext/Architext_deployed/api/predict/'

st.set_page_config(
page_title='Architext',
Expand All @@ -18,7 +18,7 @@
query = st.experimental_get_query_params()
platform = special.get_host()

submit= False
submit = False
first_try = 'architext_layout' not in st.session_state
st.image('architext_header.png')
form, image, three_d = st.columns(3)
Expand All @@ -28,7 +28,7 @@
user_input = st.text_input(
label='DESCRIBE YOUR IDEAL APARTMENT',
value='An apartment with two bedrooms and one bathroom',
)
)

creativity = st.selectbox(
label='Creativity', options=['Low', 'Medium', 'High']
Expand Down Expand Up @@ -96,23 +96,23 @@


if not first_try and platform == 'rhino':

inputs.send(
data=hb_model.to_dict(),
isPollinationModel=True,
defaultChecked=True,
unique_id=str(uuid.uuid4()),
default_checked=False,
is_pollination_model=True,
label='View design option',
uniqueId='unique-id-02',
options={'layer': 'daylight_factor_results'},
key='architext option',
)

button.send(
'BakePollinationModel',
hb_model.to_dict(),
'bake-geometry-key',
action='BakePollinationModel',
data=hb_model.to_dict(),
unique_id=str(uuid.uuid4()),
options={
"layer": "architext_option",
"units": "Meters"
},
key='bake-geometry',
)
)

0 comments on commit 292d45b

Please sign in to comment.