Spaces:
Sleeping
Sleeping
Commit
·
eac755c
1
Parent(s):
de3c6cf
Give feedback
Browse files- app.py +22 -1
- evaluations/license.py +2 -0
app.py
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
import streamlit as st
|
2 |
from evaluations.repo_evaluations import evaluate
|
|
|
|
|
|
|
3 |
|
4 |
st.write("\n")
|
5 |
st.write("Welcome to the online reproducibility evaluation tool!")
|
@@ -17,4 +20,22 @@ with st.form("my_form"):
|
|
17 |
# Every form must have a submit button.
|
18 |
submitted = st.form_submit_button("Submit feedback")
|
19 |
if submitted:
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from evaluations.repo_evaluations import evaluate
|
3 |
+
import requests
|
4 |
+
import json
|
5 |
+
import os
|
6 |
|
7 |
st.write("\n")
|
8 |
st.write("Welcome to the online reproducibility evaluation tool!")
|
|
|
20 |
# Every form must have a submit button.
|
21 |
submitted = st.form_submit_button("Submit feedback")
|
22 |
if submitted:
|
23 |
+
if repo_link and feedback:
|
24 |
+
st.write("Repository:", repo_link)
|
25 |
+
st.write("Feedback:", feedback)
|
26 |
+
|
27 |
+
google_form_url = "https://docs.google.com/forms/d/e/1FAIpQLSeJ6eWl4rdZX2lKnIMkylcMBR0qj2Dq2dDHzQX5dfUjOieB7w/formResponse"
|
28 |
+
form_data = {
|
29 |
+
"entry.1379878677": repo_link, # Replace with your Google Form field ID for URL
|
30 |
+
"entry.1888584307": feedback # Replace with your Google Form field ID for feedback
|
31 |
+
}
|
32 |
+
|
33 |
+
# Send the form data using a POST request
|
34 |
+
response = requests.post(google_form_url, data=form_data)
|
35 |
+
|
36 |
+
if response.status_code == 200:
|
37 |
+
st.success("Feedback successfully submitted! Thank you.")
|
38 |
+
else:
|
39 |
+
st.error("There was an issue submitting your feedback. Please try again later.")
|
40 |
+
else:
|
41 |
+
st.warning("Please provide feedback before submitting.")
|
evaluations/license.py
CHANGED
@@ -19,11 +19,13 @@ def evaluate(verbose, llm, zip, readme):
|
|
19 |
log(verbose, "LOG", f"Found license file: {license_files[0]}")
|
20 |
|
21 |
overall = "Yes"
|
|
|
22 |
|
23 |
if (readme):
|
24 |
if ("License" in readme):
|
25 |
log(verbose, "LOG", "License found in README.")
|
26 |
overall = "Yes"
|
|
|
27 |
|
28 |
log(verbose, "ERROR", "LICENSE file not found.")
|
29 |
return overall
|
|
|
19 |
log(verbose, "LOG", f"Found license file: {license_files[0]}")
|
20 |
|
21 |
overall = "Yes"
|
22 |
+
return overall
|
23 |
|
24 |
if (readme):
|
25 |
if ("License" in readme):
|
26 |
log(verbose, "LOG", "License found in README.")
|
27 |
overall = "Yes"
|
28 |
+
return overall
|
29 |
|
30 |
log(verbose, "ERROR", "LICENSE file not found.")
|
31 |
return overall
|