mmargg commited on
Commit
ee7a86b
·
verified ·
1 Parent(s): d6d42a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -134,8 +134,6 @@ client= InferenceClient("openai/gpt-oss-20b")
134
  #defining role of AI and user
135
 
136
  def respond(message,history):
137
- topic_chunks=[]
138
- messages = [{"role": "assistant", "content": f"You are a friendly, helpful chatbot that gives academic advice to disadvantaged students about their education based on their question. You only answer in complete sentences with correct grammar, punctuation, and complete ideas. When you give advice, keep in mind the following information {information}"}]
139
  topic_chunks=[]
140
  if chatbot_topic=="Academia":
141
 
@@ -159,6 +157,8 @@ def respond(message,history):
159
  topic_chunks=get_top_chunks(message, chunk_embeddings, cleaned_chunks4)
160
  print(topic_chunks)
161
  information = get_top_chunks(message, chunk_embeddings, cleaned_chunks4),"/n".join(topic_chunks)
 
 
162
 
163
 
164
  if history:
 
134
  #defining role of AI and user
135
 
136
  def respond(message,history):
 
 
137
  topic_chunks=[]
138
  if chatbot_topic=="Academia":
139
 
 
157
  topic_chunks=get_top_chunks(message, chunk_embeddings, cleaned_chunks4)
158
  print(topic_chunks)
159
  information = get_top_chunks(message, chunk_embeddings, cleaned_chunks4),"/n".join(topic_chunks)
160
+
161
+ messages = [{"role": "assistant", "content": f"You are a friendly, helpful chatbot that gives academic advice to disadvantaged students about their education based on their question. You only answer in complete sentences with correct grammar, punctuation, and complete ideas. When you give advice, keep in mind the following information {information}"}]
162
 
163
 
164
  if history: