Sambhavnoobcoder commited on
Commit
9244220
·
verified ·
1 Parent(s): 568558e

scrollable UI attempt

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -112,6 +112,8 @@ def generate_concise_response(prompt, context):
112
 
113
  # Main function to execute the pipeline
114
  def chatbot(message, history):
 
 
115
  lecture_notes = fetch_lecture_notes()
116
  model_architectures = fetch_model_architectures()
117
 
@@ -141,12 +143,15 @@ def chatbot(message, history):
141
 
142
  # Generate a concise and relevant summary using Gemini
143
  prompt = "Summarize the user queries so far"
144
- user_queries_summary = " ".join(message)
145
  concise_response = generate_concise_response(prompt, user_queries_summary)
146
  print("Concise Response:")
147
  print(concise_response)
148
 
149
- return total_text
 
 
 
150
 
151
  iface = gr.ChatInterface(
152
  chatbot,
 
112
 
113
  # Main function to execute the pipeline
114
  def chatbot(message, history):
115
+ global conversation_history
116
+
117
  lecture_notes = fetch_lecture_notes()
118
  model_architectures = fetch_model_architectures()
119
 
 
143
 
144
  # Generate a concise and relevant summary using Gemini
145
  prompt = "Summarize the user queries so far"
146
+ user_queries_summary = " ".join([message])
147
  concise_response = generate_concise_response(prompt, user_queries_summary)
148
  print("Concise Response:")
149
  print(concise_response)
150
 
151
+ # Update conversation history with the new user message and system response
152
+ history.append((message, total_text))
153
+
154
+ return history
155
 
156
  iface = gr.ChatInterface(
157
  chatbot,