acecalisto3 commited on
Commit
8804eea
·
verified ·
1 Parent(s): 2194b6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -9,6 +9,7 @@ from i_search import i_search as i_s
9
  from datetime import datetime
10
  import logging
11
  import json
 
12
 
13
  now = datetime.now()
14
  date_time_str = now.strftime("%Y-%m-%d %H:%M:%S")
@@ -24,7 +25,7 @@ logging.basicConfig(
24
  format="%(asctime)s - %(levelname)s - %(message)s",
25
  )
26
 
27
- agents =[
28
  "WEB_DEV",
29
  "AI_SYSTEM_PROMPT",
30
  "PYTHON_CODE_DEV"
@@ -478,7 +479,7 @@ def project_explorer(path):
478
  tree = get_file_tree(path)
479
  display_file_tree(tree)
480
 
481
- def chat_app_logic(message, history):
482
  # Your existing code here
483
 
484
  try:
@@ -556,8 +557,8 @@ def main():
556
  gr.Button(value=example[0]).click(lambda: chat_app_logic, inputs=[(example[0], message, purpose)], outputs=chatbot)
557
 
558
  # Connect components to the chat app logic
559
- submit_button.click(chat_app_logic, inputs=[message, history], outputs=chatbot)
560
- message.submit(chat_app_logic, inputs=[ history, message], outputs=chatbot)
561
  # Connect components to the project explorer
562
  explore_button.click(project_explorer, inputs=[project_path], outputs=project_output)
563
 
 
9
  from datetime import datetime
10
  import logging
11
  import json
12
+ import nltk # Import nltk for sentence tokenization
13
 
14
  now = datetime.now()
15
  date_time_str = now.strftime("%Y-%m-%d %H:%M:%S")
 
25
  format="%(asctime)s - %(levelname)s - %(message)s",
26
  )
27
 
28
+ agents = [
29
  "WEB_DEV",
30
  "AI_SYSTEM_PROMPT",
31
  "PYTHON_CODE_DEV"
 
479
  tree = get_file_tree(path)
480
  display_file_tree(tree)
481
 
482
+ def chat_app_logic(message, history, agent_name, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty):
483
  # Your existing code here
484
 
485
  try:
 
557
  gr.Button(value=example[0]).click(lambda: chat_app_logic, inputs=[(example[0], message, purpose)], outputs=chatbot)
558
 
559
  # Connect components to the chat app logic
560
+ submit_button.click(chat_app_logic, inputs=[message, history, agent_name, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty], outputs=chatbot)
561
+ message.submit(chat_app_logic, inputs=[ history, message, agent_name, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty], outputs=chatbot)
562
  # Connect components to the project explorer
563
  explore_button.click(project_explorer, inputs=[project_path], outputs=project_output)
564