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 openai | |
import streamlit | |
openai.api_key = streamlit.secrets['OPENAI_API_KEY'] | |
class AIAgent(): | |
def __init__(self, model="gpt-3.5-turbo"): | |
self.model=model | |
self.system_message = """For each query, consider writings by philosophers that have addressed that question and choose one. | |
Respond to the query from the point of view of that philosopher | |
Finally, use those referenced sources to form a response to the query that the chosen philosopher would support. |
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 | |
import matplotlib.pyplot as plt | |
from keras import regularizers, optimizers | |
from keras.layers import Dense, Dropout, Input | |
from keras.models import Sequential, load_model | |
from keras.callbacks import ModelCheckpoint | |
from keras.datasets import boston_housing | |
from keras.losses import MeanSquaredError |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder