Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonshambo committed Jul 7, 2024
2 parents 5cb7d57 + 6c3a2b3 commit b4cc75f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/gemini_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ def main():
print(json.dumps({"error": "Analysis failed"}))


if __name__ == '__main__':
if __name__ == "__main__":
main()
6 changes: 3 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ def analyze():
analyzer._input_code = code
style_guide = analyzer.analyze_code()
processed_stule_guide = json.loads(style_guide)
issues = {'issues': processed_stule_guide}
issues = {"issues": processed_stule_guide}
if style_guide:
return jsonify({'style_guide': issues}), 200
return jsonify({"style_guide": issues}), 200
else:
return jsonify({"error": "Analysis failed"}), 500


if __name__ == '__main__':
if __name__ == "__main__":
app.run(port=5000)
2 changes: 1 addition & 1 deletion streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Expanders
for items in data["issues"]:
with st.expander(f"Line `{items['line']}`"):
st.write(items['message'])
st.write(items["message"])
# JSON output
st.subheader("Raw API response : ")
with st.expander("Expand"):
Expand Down

0 comments on commit b4cc75f

Please sign in to comment.