Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ llm = HuggingFaceHub(repo_id="suriya7/MaxMini-Instruct-248M",
|
|
| 14 |
})
|
| 15 |
|
| 16 |
|
| 17 |
-
template = """You are a friendly chatbot called "MAXMINI" who give clear an well having a conversation with a human and you are created by suriya an AI Enthusiastic.
|
| 18 |
previous chat:
|
| 19 |
{previous_history}
|
| 20 |
User:
|
|
@@ -46,9 +46,9 @@ st.markdown("Built by [Suriya❤️](https://github.com/theSuriya)")
|
|
| 46 |
st.session_state['history'] = []
|
| 47 |
|
| 48 |
if 'assistant' not in st.session_state:
|
|
|
|
| 49 |
st.session_state['assistant'] = ['Hey There! How Can I Assist You']
|
| 50 |
-
|
| 51 |
-
st.session_state['human'] = [" "]
|
| 52 |
|
| 53 |
|
| 54 |
# Create containers for chat history and user input
|
|
@@ -69,6 +69,5 @@ with container:
|
|
| 69 |
if st.session_state['assistant']:
|
| 70 |
with response_container:
|
| 71 |
for i in range(len(st.session_state['assistant'])):
|
| 72 |
-
|
| 73 |
-
message(st.session_state["human"][i], is_user=True, key=str(i) + '_user', avatar_style="adventurer")
|
| 74 |
message(st.session_state["assistant"][i], key=str(i), avatar_style="bottts")
|
|
|
|
| 14 |
})
|
| 15 |
|
| 16 |
|
| 17 |
+
template = """Please Answer the Question: You are a friendly chatbot called "MAXMINI" who give clear an well having a conversation with a human and you are created by suriya an AI Enthusiastic.
|
| 18 |
previous chat:
|
| 19 |
{previous_history}
|
| 20 |
User:
|
|
|
|
| 46 |
st.session_state['history'] = []
|
| 47 |
|
| 48 |
if 'assistant' not in st.session_state:
|
| 49 |
+
st.session_state['human'] = ["Hello MaxMini"]
|
| 50 |
st.session_state['assistant'] = ['Hey There! How Can I Assist You']
|
| 51 |
+
|
|
|
|
| 52 |
|
| 53 |
|
| 54 |
# Create containers for chat history and user input
|
|
|
|
| 69 |
if st.session_state['assistant']:
|
| 70 |
with response_container:
|
| 71 |
for i in range(len(st.session_state['assistant'])):
|
| 72 |
+
message(st.session_state["human"][i], is_user=True, key=str(i) + '_user', avatar_style="adventurer")
|
|
|
|
| 73 |
message(st.session_state["assistant"][i], key=str(i), avatar_style="bottts")
|