Divyanshh commited on
Commit
35f4027
1 Parent(s): 53deb44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -17,9 +17,9 @@ def rm_dir_readonly(func, path, _):
17
  def clone_repo(repo):
18
  if os.path.exists("githubCode") and os.path.isdir("githubCode"):
19
  print("File already exists!!")
20
- shutil.rmtree('githubCode', onerror=rm_dir_readonly)
21
- print("cleaning and cloning repo")
22
- git.Repo.clone_from(repo,"githubCode")
23
 
24
  with open("Code.txt", "r+", encoding="utf-8") as output:
25
  output.truncate(0)
@@ -34,6 +34,10 @@ if btn and not flag:
34
 
35
  st.title("Nile")
36
 
 
 
 
 
37
  # Initialize chat history
38
  if "messages" not in st.session_state:
39
  st.session_state.messages = []
@@ -45,8 +49,10 @@ for message in st.session_state.messages:
45
 
46
  # Accept user input
47
  if prompt := st.chat_input("What's your question ?"):
48
- from util import ask
 
49
  # Add user message to chat history
 
50
  st.session_state.messages.append({"role": "user", "content": prompt})
51
  # Display user message in chat message container
52
  with st.chat_message("user"):
 
17
  def clone_repo(repo):
18
  if os.path.exists("githubCode") and os.path.isdir("githubCode"):
19
  print("File already exists!!")
20
+ # shutil.rmtree('githubCode', onerror=rm_dir_readonly)
21
+ # print("cleaning and cloning repo")
22
+ # git.Repo.clone_from(repo,"githubCode")
23
 
24
  with open("Code.txt", "r+", encoding="utf-8") as output:
25
  output.truncate(0)
 
34
 
35
  st.title("Nile")
36
 
37
+ if flag:
38
+ from get_stack import techStack
39
+ st.markdown(techStack)
40
+
41
  # Initialize chat history
42
  if "messages" not in st.session_state:
43
  st.session_state.messages = []
 
49
 
50
  # Accept user input
51
  if prompt := st.chat_input("What's your question ?"):
52
+ from util import ask, techStack
53
+ techStack = True
54
  # Add user message to chat history
55
+ st.markdown(techStack)
56
  st.session_state.messages.append({"role": "user", "content": prompt})
57
  # Display user message in chat message container
58
  with st.chat_message("user"):