Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,6 @@ IBM_URL_CHAT = "https://us-south.ml.cloud.ibm.com/ml/v1/text/chat?version=2023-1
|
|
15 |
|
16 |
if "messages" not in st.session_state:
|
17 |
st.session_state.messages = []
|
18 |
-
IBM_token()
|
19 |
|
20 |
##############################################
|
21 |
##
|
@@ -65,6 +64,9 @@ def IBM_chat (messages):
|
|
65 |
response = response.json()
|
66 |
return response["choices"][0]["message"]["content"]
|
67 |
|
|
|
|
|
|
|
68 |
def get_credentials():
|
69 |
return {
|
70 |
"url" : "https://us-south.ml.cloud.ibm.com",
|
|
|
15 |
|
16 |
if "messages" not in st.session_state:
|
17 |
st.session_state.messages = []
|
|
|
18 |
|
19 |
##############################################
|
20 |
##
|
|
|
64 |
response = response.json()
|
65 |
return response["choices"][0]["message"]["content"]
|
66 |
|
67 |
+
## get token
|
68 |
+
IBM_token()
|
69 |
+
|
70 |
def get_credentials():
|
71 |
return {
|
72 |
"url" : "https://us-south.ml.cloud.ibm.com",
|