Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import keyfile
|
2 |
import streamlit as st
|
3 |
from langchain_openai import OpenAI
|
4 |
import getpass
|
@@ -6,8 +6,7 @@ import os
|
|
6 |
|
7 |
# Creating a function for getting the responses from OpenAI
|
8 |
def get_response(question):
|
9 |
-
|
10 |
-
os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ")
|
11 |
llm = OpenAI()
|
12 |
answer = llm.invoke(question)
|
13 |
return answer
|
|
|
1 |
+
import keyfile
|
2 |
import streamlit as st
|
3 |
from langchain_openai import OpenAI
|
4 |
import getpass
|
|
|
6 |
|
7 |
# Creating a function for getting the responses from OpenAI
|
8 |
def get_response(question):
|
9 |
+
os.environ["OPENAI_API_KEY"] = key.
|
|
|
10 |
llm = OpenAI()
|
11 |
answer = llm.invoke(question)
|
12 |
return answer
|