Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,13 +7,18 @@ class LLM_Langchain():
|
|
7 |
def __init__(self):
|
8 |
st.warning("Warning: input function needs cleaning and may take long to be processed")
|
9 |
st.header('🦜 Code summarization with CodeT5-small')
|
10 |
-
st.
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
12 |
self.API_KEY = os.environ["API_KEY"]
|
13 |
|
14 |
model_parent = st.sidebar.selectbox(
|
15 |
-
label = "Choose
|
16 |
-
options = ["python", "java", "javascript", "php", "ruby"],
|
17 |
help="Choose languages",
|
18 |
)
|
19 |
|
@@ -25,7 +30,7 @@ class LLM_Langchain():
|
|
25 |
model_name = return_sum_models(model_parent)
|
26 |
|
27 |
self.checkpoint = st.sidebar.selectbox(
|
28 |
-
label = "Choose
|
29 |
options = [model_name, "Salesforce/codet5-base-multi-sum", f"Salesforce/codet5-base-codexglue-sum-{model_parent}"],
|
30 |
help="Model used to predict",
|
31 |
disabled=model_name_visibility
|
|
|
7 |
def __init__(self):
|
8 |
st.warning("Warning: input function needs cleaning and may take long to be processed")
|
9 |
st.header('🦜 Code summarization with CodeT5-small')
|
10 |
+
st.info("Dataset sampled from subsets of CodeXGLUE !")
|
11 |
+
|
12 |
+
self.api_key_area = st.sidebar.text_input(
|
13 |
+
'API key (not necessary for now)',
|
14 |
+
type='password',
|
15 |
+
help="Type in your HuggingFace API key to use this app")
|
16 |
+
|
17 |
self.API_KEY = os.environ["API_KEY"]
|
18 |
|
19 |
model_parent = st.sidebar.selectbox(
|
20 |
+
label = "Choose language",
|
21 |
+
options = ["python", "java", "javascript", "php", "ruby", "go"],
|
22 |
help="Choose languages",
|
23 |
)
|
24 |
|
|
|
30 |
model_name = return_sum_models(model_parent)
|
31 |
|
32 |
self.checkpoint = st.sidebar.selectbox(
|
33 |
+
label = "Choose model (nam194/... is my model)",
|
34 |
options = [model_name, "Salesforce/codet5-base-multi-sum", f"Salesforce/codet5-base-codexglue-sum-{model_parent}"],
|
35 |
help="Model used to predict",
|
36 |
disabled=model_name_visibility
|