Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,9 @@ API_KEY = os.environ.get('HUGGINGFACE_API_KEY')
|
|
12 |
# headers = {"Authorization":"Bearer "+API_KEY}
|
13 |
|
14 |
model_links = {
|
15 |
-
"LegacyLift🚀": base_url + "mistralai/Mistral-7B-Instruct-v0.2",
|
16 |
-
"ModernMigrate⭐": base_url + "mistralai/Mixtral-8x7B-Instruct-v0.1",
|
17 |
-
"RetroRecode🔄": base_url + "microsoft/Phi-3-mini-4k-instruct"
|
18 |
}
|
19 |
|
20 |
# Pull info about the model to display
|
@@ -64,8 +64,8 @@ st.sidebar.button('Reset Chat', on_click=reset_conversation) # Reset button
|
|
64 |
st.sidebar.write(f"You're now chatting with **{selected_model}**")
|
65 |
st.sidebar.markdown(model_info[selected_model]['description'])
|
66 |
st.sidebar.image(model_info[selected_model]['logo'])
|
67 |
-
st.sidebar.markdown("*
|
68 |
-
|
69 |
|
70 |
if "prev_option" not in st.session_state:
|
71 |
st.session_state.prev_option = selected_model
|
@@ -88,7 +88,7 @@ for message in st.session_state.messages:
|
|
88 |
with st.chat_message(message["role"]):
|
89 |
st.markdown(message["content"])
|
90 |
|
91 |
-
if prompt := st.chat_input(f"Hi I'm {selected_model}
|
92 |
custom_instruction = "Act like a Human in conversation"
|
93 |
|
94 |
with st.chat_message("user"):
|
|
|
12 |
# headers = {"Authorization":"Bearer "+API_KEY}
|
13 |
|
14 |
model_links = {
|
15 |
+
"LegacyLift🚀": base_url + "mistralai/Mistral-7B-Instruct-v0.2",
|
16 |
+
"ModernMigrate⭐": base_url + "mistralai/Mixtral-8x7B-Instruct-v0.1",
|
17 |
+
"RetroRecode🔄": base_url + "microsoft/Phi-3-mini-4k-instruct"
|
18 |
}
|
19 |
|
20 |
# Pull info about the model to display
|
|
|
64 |
st.sidebar.write(f"You're now chatting with **{selected_model}**")
|
65 |
st.sidebar.markdown(model_info[selected_model]['description'])
|
66 |
st.sidebar.image(model_info[selected_model]['logo'])
|
67 |
+
st.sidebar.markdown("*Generating the code might go slow if you are using low power resources *")
|
68 |
+
|
69 |
|
70 |
if "prev_option" not in st.session_state:
|
71 |
st.session_state.prev_option = selected_model
|
|
|
88 |
with st.chat_message(message["role"]):
|
89 |
st.markdown(message["content"])
|
90 |
|
91 |
+
if prompt := st.chat_input(f"Hi I'm {selected_model}, How can I help you today?"):
|
92 |
custom_instruction = "Act like a Human in conversation"
|
93 |
|
94 |
with st.chat_message("user"):
|