Spaces:
Sleeping
Sleeping
good morning1 commit
Browse files
app.py
CHANGED
@@ -13,25 +13,22 @@ def main():
|
|
13 |
# Generate response
|
14 |
if st.button("Submit"):
|
15 |
try:
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
output.error(f"Error occured please contact the admin",e)
|
32 |
-
time.sleep(5)
|
33 |
-
st.experimental_rerun()
|
34 |
-
|
35 |
|
36 |
if __name__ == "__main__":
|
37 |
main()
|
|
|
|
13 |
# Generate response
|
14 |
if st.button("Submit"):
|
15 |
try:
|
16 |
+
repos, status = web_scrape(user_url)
|
17 |
+
task_progress = st.progress(0)
|
18 |
+
task_progress.progress("Tools is taking action please wait")
|
19 |
+
if status == 0:
|
20 |
+
repo_path = data_cloning(repos)
|
21 |
+
data_cleaning(repo_path)
|
22 |
+
query = analyse()
|
23 |
+
response_gpt = llm_chain([str(query)])
|
24 |
+
# Display the response
|
25 |
+
st.text_area("Bot Response:", value=response_gpt, height=100)
|
26 |
+
except Exception as e:
|
27 |
+
output = st.empty()
|
28 |
+
output.error("Error occurred. Please contact the admin.", e)
|
29 |
+
time.sleep(5)
|
30 |
+
st.experimental_rerun()
|
|
|
|
|
|
|
|
|
31 |
|
32 |
if __name__ == "__main__":
|
33 |
main()
|
34 |
+
|