Update app.py
Browse files
app.py
CHANGED
@@ -45,17 +45,17 @@ models =[key for key in model_links.keys()]
|
|
45 |
selected_model = st.sidebar.selectbox("Выбрать модель GPT", models)
|
46 |
|
47 |
#Add reset button to clear conversation
|
48 |
-
st.sidebar.button('
|
49 |
|
50 |
# Create a temperature slider
|
51 |
-
temp_values = st.sidebar.slider('
|
52 |
-
st.sidebar.markdown("
|
53 |
-
st.sidebar.markdown("
|
54 |
|
55 |
|
56 |
# Create model description
|
57 |
-
st.sidebar.markdown("
|
58 |
-
st.sidebar.markdown("\n
|
59 |
|
60 |
|
61 |
if "prev_option" not in st.session_state:
|
@@ -73,8 +73,8 @@ if st.session_state.prev_option != selected_model:
|
|
73 |
repo_id = model_links[selected_model]
|
74 |
|
75 |
|
76 |
-
st.subheader(f'[GPT-
|
77 |
-
# st.title(f'GPT-
|
78 |
|
79 |
# Set a default model
|
80 |
if selected_model not in st.session_state:
|
@@ -93,7 +93,7 @@ for message in st.session_state.messages:
|
|
93 |
|
94 |
|
95 |
# Accept user input
|
96 |
-
if prompt := st.chat_input(f"
|
97 |
# Display user message in chat message container
|
98 |
with st.chat_message("user"):
|
99 |
st.markdown(prompt)
|
@@ -119,8 +119,8 @@ if prompt := st.chat_input(f"Привет. Я {selected_model}. Как я мог
|
|
119 |
|
120 |
except Exception as e:
|
121 |
# st.empty()
|
122 |
-
response = "
|
123 |
-
\n
|
124 |
st.write(response)
|
125 |
|
126 |
|
|
|
45 |
selected_model = st.sidebar.selectbox("Выбрать модель GPT", models)
|
46 |
|
47 |
#Add reset button to clear conversation
|
48 |
+
st.sidebar.button('New Chat', on_click=reset_conversation) #Reset button
|
49 |
|
50 |
# Create a temperature slider
|
51 |
+
temp_values = st.sidebar.slider('ChatGPT Temperature', 0.0, 1.0, (0.5))
|
52 |
+
st.sidebar.markdown("Temperature in ChatGPT affects the quality and coherence of the generated text.")
|
53 |
+
st.sidebar.markdown("**For optimum results, we recommend selecting a temperature between 0.5 and 0.7**")
|
54 |
|
55 |
|
56 |
# Create model description
|
57 |
+
st.sidebar.markdown("*The content created may not be accurate.*")
|
58 |
+
st.sidebar.markdown("\n Our website: [Chat-GPT-Free.com](https://chat-gpt-free.com/).")
|
59 |
|
60 |
|
61 |
if "prev_option" not in st.session_state:
|
|
|
73 |
repo_id = model_links[selected_model]
|
74 |
|
75 |
|
76 |
+
st.subheader(f'[Chat-GPT-Free.com](https://chat-gpt-free.com/) with AI model {selected_model}')
|
77 |
+
# st.title(f'Chat-GPT-Free is now using {selected_model}')
|
78 |
|
79 |
# Set a default model
|
80 |
if selected_model not in st.session_state:
|
|
|
93 |
|
94 |
|
95 |
# Accept user input
|
96 |
+
if prompt := st.chat_input(f"Hi. I'm {selected_model}. How can I help you today?"):
|
97 |
# Display user message in chat message container
|
98 |
with st.chat_message("user"):
|
99 |
st.markdown(prompt)
|
|
|
119 |
|
120 |
except Exception as e:
|
121 |
# st.empty()
|
122 |
+
response = "The GPT is overloaded!\
|
123 |
+
\n Repeat your request later :( "
|
124 |
st.write(response)
|
125 |
|
126 |
|