Shreyas094 commited on
Commit
bdb53e0
·
verified ·
1 Parent(s): d65cf7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -25,6 +25,7 @@ from sentence_transformers import SentenceTransformer
25
  from llama_parse import LlamaParse
26
  import asyncio
27
  import nest_asyncio
 
28
 
29
  nest_asyncio.apply()
30
  asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # Use this on Windows
@@ -464,10 +465,10 @@ with gr.Blocks() as demo:
464
  return "", history
465
 
466
  submit_button.click(chat, inputs=[question_input, chatbot, temperature_slider, top_p_slider, repetition_penalty_slider, web_search_checkbox], outputs=[question_input, chatbot])
467
-
468
  clear_button = gr.Button("Clear Cache")
469
  clear_output = gr.Textbox(label="Cache Status")
470
  clear_button.click(clear_cache, inputs=[], outputs=clear_output)
471
 
472
  if __name__ == "__main__":
473
- demo.launch(server_port=7861) # or any other available port
 
25
  from llama_parse import LlamaParse
26
  import asyncio
27
  import nest_asyncio
28
+ from your_module import EnhancedContextDrivenChatbot, ask_question, update_vectors, clear_cache
29
 
30
  nest_asyncio.apply()
31
  asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # Use this on Windows
 
465
  return "", history
466
 
467
  submit_button.click(chat, inputs=[question_input, chatbot, temperature_slider, top_p_slider, repetition_penalty_slider, web_search_checkbox], outputs=[question_input, chatbot])
468
+
469
  clear_button = gr.Button("Clear Cache")
470
  clear_output = gr.Textbox(label="Cache Status")
471
  clear_button.click(clear_cache, inputs=[], outputs=clear_output)
472
 
473
  if __name__ == "__main__":
474
+ demo.launch()