Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,6 @@ import numpy as np
|
|
| 17 |
import pandas as pd
|
| 18 |
from dotenv import load_dotenv # pip3 install python-dotenv
|
| 19 |
import requests
|
| 20 |
-
from codeinterpreterapi import CodeInterpreterSession, File
|
| 21 |
import streamlit as st
|
| 22 |
import openai
|
| 23 |
import os
|
|
@@ -253,15 +252,15 @@ def text_mode():
|
|
| 253 |
|
| 254 |
# Set a default model
|
| 255 |
if "openai_model" not in st.session_state:
|
| 256 |
-
st.session_state["openai_model"] = "gpt-
|
| 257 |
|
| 258 |
if radio_1 == 'ChatGPT-3.5':
|
| 259 |
# print('----------'*5)
|
| 260 |
print('radio_1: GPT-3.5 starts!')
|
| 261 |
-
st.session_state["openai_model"] = "gpt-
|
| 262 |
elif radio_1 == 'ChatGPT-4':
|
| 263 |
print('radio_1: GPT-4.0 starts!')
|
| 264 |
-
st.session_state["openai_model"] = "gpt-
|
| 265 |
else:
|
| 266 |
st.markdown("**当前大模型无效,请在左侧工具栏中选择一个有效的模型。您现在访问的站点仅提供ChatGPT中的GPT-3.5/4。**")
|
| 267 |
|
|
|
|
| 17 |
import pandas as pd
|
| 18 |
from dotenv import load_dotenv # pip3 install python-dotenv
|
| 19 |
import requests
|
|
|
|
| 20 |
import streamlit as st
|
| 21 |
import openai
|
| 22 |
import os
|
|
|
|
| 252 |
|
| 253 |
# Set a default model
|
| 254 |
if "openai_model" not in st.session_state:
|
| 255 |
+
st.session_state["openai_model"] = "gpt-4o-mini"
|
| 256 |
|
| 257 |
if radio_1 == 'ChatGPT-3.5':
|
| 258 |
# print('----------'*5)
|
| 259 |
print('radio_1: GPT-3.5 starts!')
|
| 260 |
+
st.session_state["openai_model"] = "gpt-4o-mini"
|
| 261 |
elif radio_1 == 'ChatGPT-4':
|
| 262 |
print('radio_1: GPT-4.0 starts!')
|
| 263 |
+
st.session_state["openai_model"] = "gpt-4o-mini"
|
| 264 |
else:
|
| 265 |
st.markdown("**当前大模型无效,请在左侧工具栏中选择一个有效的模型。您现在访问的站点仅提供ChatGPT中的GPT-3.5/4。**")
|
| 266 |
|