Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
update comfyflowapp
Browse files Browse the repository at this point in the history
  • Loading branch information
xingren23 committed Feb 5, 2024
1 parent 4e71dec commit 165ab22
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
1 change: 0 additions & 1 deletion .streamlit/secrets.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
COMFYFLOW_API_URL="https://api.comfyflow.app"
DISCORD_CLIENT_ID="1163088920305737728"

[connections.comfyflow_db]
url = "sqlite:///comfyflow.db"
12 changes: 6 additions & 6 deletions Home.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def back_home_signup():

auth_instance = MyAuthenticate("comfyflow_token", "ComfyFlowApp: Load ComfyUI workflow as webapp in seconds.")
if not st.session_state['authentication_status']:
with header_button:
client_id = os.getenv('DISCORD_CLIENT_ID')
redirect_uri = os.getenv('DISCORD_REDIRECT_URI')
signup_url = f"https://discord.com/oauth2/authorize?client_id={client_id}&scope=identify+email&redirect_uri={redirect_uri}&response_type=code"
st.link_button("Sign Up", type="primary", url=signup_url, help="Sign up with Discord")
# with header_button:
# client_id = os.getenv('DISCORD_CLIENT_ID')
# redirect_uri = os.getenv('DISCORD_REDIRECT_URI')
# signup_url = f"https://discord.com/oauth2/authorize?client_id={client_id}&scope=identify+email&redirect_uri={redirect_uri}&response_type=code"
# st.link_button("Sign Up", type="primary", url=signup_url, help="Sign up with Discord")

with st.container():
try:
st.markdown("ComfyFlowApp offers an in-built test account(username: demo) with the credentials(password: comfyflowapp). For an enhanced user experience, please sign up your account at https://comfyflow.app.")
st.markdown("ComfyFlowApp offers an in-built test account(username: demo) with the credentials(password: comfyflowapp).")
auth_instance.login("Login to ComfyFlowApp")
except Exception as e:
st.error(f"Login failed, {e}")
Expand Down
2 changes: 0 additions & 2 deletions bin/creator_daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export STREAMLIT_SERVER_PORT=8501
export COMFYFLOW_API_URL=https://api.comfyflow.app
# set COMFYUI_SERVER_ADDR to comfyui server addr
export COMFYUI_SERVER_ADDR=http://localhost:8188
# set discord callback url
export DISCORD_REDIRECT_URI=https://comfyflow.app
# set MODE to Creator
export MODE=Creator

Expand Down
2 changes: 0 additions & 2 deletions bin/creator_run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ set STREAMLIT_SERVER_PORT=8501
set COMFYFLOW_API_URL=https://api.comfyflow.app
:: set COMFYUI_SERVER_ADDR to localhost:8188
set COMFYUI_SERVER_ADDR=http://localhost:8188
:: set discord callback url
set DISCORD_REDIRECT_URI=https://comfyflow.app
:: set MODE
set MODE=Creator

Expand Down
2 changes: 0 additions & 2 deletions bin/creator_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export STREAMLIT_SERVER_PORT=8501
export COMFYFLOW_API_URL=https://api.comfyflow.app
# set COMFYUI_SERVER_ADDR to comfyui server addr
export COMFYUI_SERVER_ADDR=http://localhost:8188
# set discord callback url
export DISCORD_REDIRECT_URI=https://comfyflow.app
# set MODE to Creator
export MODE=Creator

Expand Down
Binary file modified docs/images/how-to-use-it.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 11 additions & 10 deletions pages/3_πŸ“š_Workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def create_operation_ui(app):
if st.session_state.get('username', 'anonymous') == app.username:
disabled = False

operate_row = row([1.2, 1.0, 1.1, 1.1, 3.3, 1.1, 1.2], vertical_align="bottom")
operate_row = row([1.2, 1.0, 1.1, 1.1, 4.5, 1.1], vertical_align="bottom")
preview_button = operate_row.button("βœ… Preview", help="Preview and check the app",
key=f"{id}-button-preview",
on_click=click_preview_app, args=(app,), disabled=disabled)
Expand Down Expand Up @@ -228,15 +228,16 @@ def create_operation_ui(app):
operate_row.button("❌ Delete", help="Delete the app", key=f"{id}-button-delete",
on_click=click_delete_app, args=(name,), disabled=disabled)

publish_button = operate_row.button("✈️ Publish", help="Publish the app with template",
key=f"{id}-button-publish",
on_click=click_publish_app, args=(app,), disabled=disabled)
if publish_button:
if status == AppStatus.CREATED.value:
st.warning(f"Please preview the app {name} first")
else:
if 'token_cookie' not in st.session_state:
st.warning("Please go to homepage for your login :point_left:")

# publish_button = operate_row.button("✈️ Publish", help="Publish the app with template",
# key=f"{id}-button-publish",
# on_click=click_publish_app, args=(app,), disabled=disabled)
# if publish_button:
# if status == AppStatus.CREATED.value:
# st.warning(f"Please preview the app {name} first")
# else:
# if 'token_cookie' not in st.session_state:
# st.warning("Please go to homepage for your login :point_left:")


def is_load_workspace_page():
Expand Down

0 comments on commit 165ab22

Please sign in to comment.