This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import os.path | |
import ssl | |
import stat | |
import subprocess | |
import sys | |
STAT_0o775 = ( | |
stat.S_IRUSR | |
| stat.S_IWUSR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
BASE_API_URL = "http://localhost:3000/api/v1/predict" | |
FLOW_ID = "864c4f98-2e59-468b-8e13-79cd8da07468" # replace with yours | |
# You can tweak the flow by adding a tweaks dictionary | |
# e.g {"OpenAI-XXXXX": {"model_name": "gpt-4"}} | |
TWEAKS = {"ChatOpenAI-g4jEr": {}, "ConversationChain-UidfJ": {}} # replace with yours | |
def run_flow(message: str, flow_id: str, tweaks: dict = None) -> dict: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "Generate an image using DALL-E2.", | |
"name": "ImageFlow", | |
"id": "18", | |
"data": { | |
"nodes": [ | |
{ | |
"width": 384, | |
"height": 559, | |
"id": "dndnode_1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configurations": [ | |
{ | |
"name": "Python: Remote Attach", | |
"type": "python", | |
"request": "attach", | |
"justMyCode": false, | |
"connect": { | |
"port": 5678 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
from keras import regularizers, optimizers | |
from keras.layers.experimental.preprocessing import TextVectorization | |
from keras.layers import Embedding, Dense, Dropout, Input, LSTM, GlobalMaxPool1D | |
from keras.models import Sequential | |
from keras.initializers import Constant | |
import tensorflow as tf | |
import spacy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: docker:latest | |
variables: | |
REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME> | |
REGION: eu-central-1 | |
TASK_DEFINTION_NAME: <TASK DEFINITION NAME> | |
CLUSTER_NAME: <CLUSTER NAME> | |
SERVICE_NAME: <SERVICE NAME> | |
services: |