awacke1 commited on
Commit
f9b7af1
β€’
1 Parent(s): f17bd3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -63,8 +63,8 @@ def load_file(file_name):
63
  content = file.read()
64
  return content
65
 
66
- def main():
67
- st.title("Memory Flag System")
68
 
69
  client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
70
 
@@ -73,7 +73,7 @@ def main():
73
  search_source = st.selectbox("Search Source", ["Semantic Search - up to 10 Mar 2024", "Arxiv Search - Latest - (EXPERIMENTAL)"])
74
  llm_model = st.selectbox("LLM Model", ["mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.2", "google/gemma-7b-it", "None"])
75
 
76
- if st.button("Search"):
77
  result = client.predict(
78
  search_query,
79
  top_n_results,
@@ -1216,6 +1216,9 @@ def StreamMedChatResponse(topic):
1216
  def arxivmain(query):
1217
  prompt = query
1218
  with st.expander("Prompts πŸ“š", expanded=True):
 
 
 
1219
  example_input = st.text_input("Enter your prompt text:", value=prompt, help="Enter text to get a response.")
1220
  if st.button("Run Prompt", help="Click to run."):
1221
  try:
@@ -1385,7 +1388,6 @@ if st.button("Clear Query Parameters", key='ClearQueryParams'):
1385
  # 18. Run AI Pipeline
1386
  if __name__ == "__main__":
1387
  whisper_main()
1388
- main()
1389
 
1390
 
1391
 
 
63
  content = file.read()
64
  return content
65
 
66
+ def MemoryFlagSystem(query):
67
+ st.title("▢️ Memory Flag System")
68
 
69
  client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
70
 
 
73
  search_source = st.selectbox("Search Source", ["Semantic Search - up to 10 Mar 2024", "Arxiv Search - Latest - (EXPERIMENTAL)"])
74
  llm_model = st.selectbox("LLM Model", ["mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.2", "google/gemma-7b-it", "None"])
75
 
76
+ if st.button("πŸ”Ž Search"):
77
  result = client.predict(
78
  search_query,
79
  top_n_results,
 
1216
  def arxivmain(query):
1217
  prompt = query
1218
  with st.expander("Prompts πŸ“š", expanded=True):
1219
+
1220
+ MemoryFlagSystem(query)
1221
+
1222
  example_input = st.text_input("Enter your prompt text:", value=prompt, help="Enter text to get a response.")
1223
  if st.button("Run Prompt", help="Click to run."):
1224
  try:
 
1388
  # 18. Run AI Pipeline
1389
  if __name__ == "__main__":
1390
  whisper_main()
 
1391
 
1392
 
1393