Spaces:
Sleeping
Sleeping
adhya-putra
commited on
Commit
•
e958e72
1
Parent(s):
393e9ec
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,10 @@
|
|
1 |
-
pip install gradio
|
2 |
-
pip install langchain
|
3 |
-
pip install openai
|
4 |
-
|
5 |
from langchain.chat_models import ChatOpenAI
|
6 |
from langchain.schema import AIMessage, HumanMessage
|
7 |
import openai
|
8 |
import gradio as gr
|
9 |
import os
|
10 |
|
11 |
-
os.environ["OPENAI_API_KEY"] = os.getenv('
|
12 |
|
13 |
llm = ChatOpenAI(temperature=1.0, model='gpt-3.5-turbo-1106')
|
14 |
|
|
|
|
|
|
|
|
|
|
|
1 |
from langchain.chat_models import ChatOpenAI
|
2 |
from langchain.schema import AIMessage, HumanMessage
|
3 |
import openai
|
4 |
import gradio as gr
|
5 |
import os
|
6 |
|
7 |
+
os.environ["OPENAI_API_KEY"] = os.getenv('OPENAI_API_KEY') # Replace with your key
|
8 |
|
9 |
llm = ChatOpenAI(temperature=1.0, model='gpt-3.5-turbo-1106')
|
10 |
|