-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
66 lines (45 loc) · 1.85 KB
/
Copy pathapp.py
File metadata and controls
66 lines (45 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import streamlit as st
import time
from utils.state import State
from utils.graph import create_graph
from utils.repo_name import extract_repo_info
# https://github.com/krishpansara/file_sorting_system
st.set_page_config(
page_title="GitMate",
layout="wide"
)
st.markdown("<h1 style='text-align:center;'>GitMate</h1>", unsafe_allow_html=True)
st.markdown("<h5 style='text-align:center;'>The Mullti Agent System that will help you to the Enhance your GitHub Reposetory</h5>", unsafe_allow_html=True)
repo_url = st.text_input("Enter GitHub Repo Link : ")
project_description = st.text_area("(Optional) Enter brief detail about your Project")
if st.button("🔍 Analyze and Improve") and repo_url:
start_time = time.time()
initial_state: State = {"repo_url":repo_url, "project_description":project_description}
repo_info = extract_repo_info(initial_state)
graph = create_graph()
final_state = graph.invoke(initial_state)
st.success(f"Completed in {time.time() - start_time:.2f}s")
st.divider()
st.subheader("📘 Improved README (Preview)")
st.markdown(final_state.get("updated_readme", ""))
st.divider()
st.subheader("🧾 Raw README (Markdown)")
st.text_area(
label="Copy this Markdown and paste directly into GitHub",
value=final_state["updated_readme"],
height=400
)
st.subheader("🧠 README Summary")
st.write(final_state.get("readme_summary", ""))
st.divider()
st.subheader("🏷️ Suggested Metadata")
st.json(final_state.get("metadata", {}))
st.divider()
st.subheader("🎯 Interviewer Review")
# st.json(final_state.get("reviewer_feedback", {}))
review = final_state.get("reviewer_feedback")
if isinstance(review, dict):
st.json(review)
else:
st.error("Reviewer output could not be parsed")
st.text(review)