thedamn commited on
Commit
1b2d20b
·
1 Parent(s): 0740591

error commit

Browse files
Files changed (2) hide show
  1. app.py +3 -0
  2. proper_main.py +3 -0
app.py CHANGED
@@ -23,6 +23,9 @@ def main():
23
  repo_path = data_cloning(repos,st)
24
  data_cleaning(repo_path,st)
25
  query = analyse(st)
 
 
 
26
  response_gpt = llm_chain([str(query)])
27
  # Display the response
28
  st.text_area("Bot Response:", value=response_gpt['text'], height=100)
 
23
  repo_path = data_cloning(repos,st)
24
  data_cleaning(repo_path,st)
25
  query = analyse(st)
26
+ if len(query) == 0:
27
+ st.write("The given User's URL doesnt Contain Python Repository")
28
+ st.experimental_rerun()
29
  response_gpt = llm_chain([str(query)])
30
  # Display the response
31
  st.text_area("Bot Response:", value=response_gpt['text'], height=100)
proper_main.py CHANGED
@@ -88,6 +88,9 @@ def data_cleaning(directory,st):
88
  def analyse(st):
89
  project_and_grades = {}
90
  st.text("Analysing...")
 
 
 
91
 
92
  for file in os.listdir(os.getcwd()):
93
  print(file)
 
88
  def analyse(st):
89
  project_and_grades = {}
90
  st.text("Analysing...")
91
+ if len(os.listdir(os.getcwd())) ==0:
92
+ st.text("Not a Valid Repo")
93
+ st.experimental_rerun()
94
 
95
  for file in os.listdir(os.getcwd()):
96
  print(file)