Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from langchain.schema import HumanMessage, SystemMessage, AIMessage
|
|
9 |
if "OPENAI_API_KEY" not in os.environ or os.environ["OPENAI_API_KEY"] == "":
|
10 |
def init_api_key(key):
|
11 |
os.environ["OPENAI_API_KEY"] = key
|
12 |
-
gr.Interface( fn=
|
13 |
openai_key = os.getenv("OPENAI_API_KEY")
|
14 |
|
15 |
chat1 = ChatOpenAI(temperature=0.9, openai_api_key=openai_key)
|
|
|
9 |
if "OPENAI_API_KEY" not in os.environ or os.environ["OPENAI_API_KEY"] == "":
|
10 |
def init_api_key(key):
|
11 |
os.environ["OPENAI_API_KEY"] = key
|
12 |
+
gr.Interface( fn=init_api_key, inputs=["text"]).launch(server_port=1113)
|
13 |
openai_key = os.getenv("OPENAI_API_KEY")
|
14 |
|
15 |
chat1 = ChatOpenAI(temperature=0.9, openai_api_key=openai_key)
|