Spaces:
Build error
Build error
widget error Commit
Browse files
app.py
CHANGED
@@ -9,14 +9,14 @@ def main():
|
|
9 |
st.title("Github Automated Repo Analysis")
|
10 |
|
11 |
# User input
|
12 |
-
user_url = st.text_input("Enter the Github URL")
|
13 |
|
14 |
-
option = st.radio("What you want me to do",["Python Analysis","GPT Evaluation"])
|
15 |
|
16 |
# Generate response
|
17 |
-
if st.button("Submit"):
|
18 |
|
19 |
-
st.text("Please wait Automation is Processing")
|
20 |
strttime=time.time()
|
21 |
repos, status = web_scrape(user_url,st)
|
22 |
|
@@ -27,22 +27,22 @@ def main():
|
|
27 |
data_cleaning(repo_path,st)
|
28 |
query,report_analysis = analyse(st)
|
29 |
if len(query) == 0:
|
30 |
-
st.write("The given User's URL doesnt Contain Python Repository")
|
31 |
break
|
32 |
if option == "Python Analysis":
|
33 |
repo_name,score=self_analysis(report_analysis)
|
34 |
output="The Complex Repo is "+ str(repo_name)+" Because the Complexity Score is "+str(score)
|
35 |
#st.write("The Complex Repo is",repo_name," Because the Complexity Score is",score)
|
36 |
-
st.text_area("Bot Response:", value=output, height=100)
|
37 |
time.sleep(15)
|
38 |
break
|
39 |
|
40 |
elif option == "GPT Evaluation":
|
41 |
response_gpt = llm_chain([str(query)])
|
42 |
# Display the response
|
43 |
-
st.text_area("Bot Response:", value=response_gpt['text'], height=100)
|
44 |
elapsed_time = time.time() - strttime
|
45 |
-
st.text(f"Execution time: {elapsed_time:.2f} seconds")
|
46 |
else:
|
47 |
output = st.empty()
|
48 |
output.error(f"Error occurred. Please contact the admin {repos}.")
|
@@ -52,3 +52,4 @@ def main():
|
|
52 |
if __name__ == "__main__":
|
53 |
main()
|
54 |
|
|
|
|
9 |
st.title("Github Automated Repo Analysis")
|
10 |
|
11 |
# User input
|
12 |
+
user_url = st.text_input("Enter the Github URL",key="1")
|
13 |
|
14 |
+
option = st.radio("What you want me to do",["Python Analysis","GPT Evaluation"],key='2')
|
15 |
|
16 |
# Generate response
|
17 |
+
if st.button("Submit",key='3'):
|
18 |
|
19 |
+
st.text("Please wait Automation is Processing",key='4')
|
20 |
strttime=time.time()
|
21 |
repos, status = web_scrape(user_url,st)
|
22 |
|
|
|
27 |
data_cleaning(repo_path,st)
|
28 |
query,report_analysis = analyse(st)
|
29 |
if len(query) == 0:
|
30 |
+
st.write("The given User's URL doesnt Contain Python Repository",key='5')
|
31 |
break
|
32 |
if option == "Python Analysis":
|
33 |
repo_name,score=self_analysis(report_analysis)
|
34 |
output="The Complex Repo is "+ str(repo_name)+" Because the Complexity Score is "+str(score)
|
35 |
#st.write("The Complex Repo is",repo_name," Because the Complexity Score is",score)
|
36 |
+
st.text_area("Bot Response:", value=output, height=100,key='6')
|
37 |
time.sleep(15)
|
38 |
break
|
39 |
|
40 |
elif option == "GPT Evaluation":
|
41 |
response_gpt = llm_chain([str(query)])
|
42 |
# Display the response
|
43 |
+
st.text_area("Bot Response:", value=response_gpt['text'], height=100,key='7')
|
44 |
elapsed_time = time.time() - strttime
|
45 |
+
st.text(f"Execution time: {elapsed_time:.2f} seconds",key='8')
|
46 |
else:
|
47 |
output = st.empty()
|
48 |
output.error(f"Error occurred. Please contact the admin {repos}.")
|
|
|
52 |
if __name__ == "__main__":
|
53 |
main()
|
54 |
|
55 |
+
|