Spaces:
Build error
Build error
use async and removed UX
Browse files191 unmodified lines19219319419519619719819910 unmodified lines2102112122132142152 unmodified lines218219220221191 unmodified lines}# Function to run on button click@webhook_endpoint("/webhooks/speckle_update") # Define a unique endpoint URLdef update_streams(dummy):speckle_token = os.environ.get("SPECKLE_TOKEN")notion_token = os.environ.get("NOTION_TOKEN")10 unmodified linesreturn "All streams updated successfully!"# Create Gradio interfaceiface = gr.Interface(fn=update_streams,2 unmodified lines)# Launch the appiface.launch()191 unmodified lines19219319419519619719819910 unmodified lines2102112122132142152162 unmodified lines219220221222223191 unmodified lines}# Function to run on button click@webhook_endpoint # Define a unique endpoint URLasync def update_streams(payload: WebhookPayload):speckle_token = os.environ.get("SPECKLE_TOKEN")notion_token = os.environ.get("NOTION_TOKEN")10 unmodified linesreturn "All streams updated successfully!""""# Create Gradio interfaceiface = gr.Interface(fn=update_streams,2 unmodified lines)# Launch the appiface.launch()"""
app.py+5-3