Spaces:
Sleeping
Sleeping
nafisehNik
commited on
Commit
β’
08e3335
1
Parent(s):
c2eb1b3
Update app.py
Browse files
app.py
CHANGED
@@ -66,16 +66,22 @@ def compute(sample, top_p, top_k, do_sample, max_length, min_length):
|
|
66 |
|
67 |
return postprocess_text
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
|
75 |
with st.sidebar:
|
76 |
st.title(" π§ Settings")
|
77 |
|
78 |
-
with st.expander("Issue Template Inputs
|
79 |
|
80 |
in_name = st.text_input("Name Metadata: ", placeholder="e.g., Bug Report or Feqture Request or Question", on_change=None)
|
81 |
in_about = st.text_input("About Metadata: ", placeholder="e.g., File a bug report", on_change=None)
|
@@ -92,7 +98,7 @@ with st.sidebar:
|
|
92 |
in_summary = st.text_area("Summary: ", placeholder="This Github Issue Template is ...", on_change=None, height=200)
|
93 |
|
94 |
|
95 |
-
with st.expander("Model
|
96 |
max_length = st.slider("max_length", 30, 512, 300)
|
97 |
min_length = st.slider("min_length", 0, 300, 30)
|
98 |
top_p = st.slider("top_p", 0.0, 1.0, 0.92)
|
@@ -100,6 +106,12 @@ with st.sidebar:
|
|
100 |
|
101 |
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
tab1, tab2 = st.tabs(["Design GitHub Issue Template", "Manual Prompt"])
|
104 |
|
105 |
with tab1:
|
@@ -116,7 +128,7 @@ with tab2:
|
|
116 |
|
117 |
with st.spinner("Please Wait..."):
|
118 |
|
119 |
-
if
|
120 |
res = compute(prompt, top_p=0.92, top_k=0, do_sample=True, max_length=300, min_length=0)
|
121 |
st.code(res, language="python")
|
122 |
|
|
|
66 |
|
67 |
return postprocess_text
|
68 |
|
69 |
+
st.markdown(
|
70 |
+
"""
|
71 |
+
<style>
|
72 |
+
[data-testid="stSidebar"][aria-expanded="true"]{
|
73 |
+
min-width: 450px;
|
74 |
+
max-width: 450px;
|
75 |
+
}
|
76 |
+
""",
|
77 |
+
unsafe_allow_html=True,
|
78 |
+
)
|
79 |
|
80 |
|
81 |
with st.sidebar:
|
82 |
st.title(" π§ Settings")
|
83 |
|
84 |
+
with st.expander("π Issue Template Inputs", True):
|
85 |
|
86 |
in_name = st.text_input("Name Metadata: ", placeholder="e.g., Bug Report or Feqture Request or Question", on_change=None)
|
87 |
in_about = st.text_input("About Metadata: ", placeholder="e.g., File a bug report", on_change=None)
|
|
|
98 |
in_summary = st.text_area("Summary: ", placeholder="This Github Issue Template is ...", on_change=None, height=200)
|
99 |
|
100 |
|
101 |
+
with st.expander("π Model Configs", False):
|
102 |
max_length = st.slider("max_length", 30, 512, 300)
|
103 |
min_length = st.slider("min_length", 0, 300, 30)
|
104 |
top_p = st.slider("top_p", 0.0, 1.0, 0.92)
|
|
|
106 |
|
107 |
|
108 |
|
109 |
+
st.markdown("[![Duplicate Space](https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14)](https://huggingface.co/spaces/nafisehNik/girt-space?duplicate=true)")
|
110 |
+
|
111 |
+
render_svg(open("assets/logo.svg").read())
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
tab1, tab2 = st.tabs(["Design GitHub Issue Template", "Manual Prompt"])
|
116 |
|
117 |
with tab1:
|
|
|
128 |
|
129 |
with st.spinner("Please Wait..."):
|
130 |
|
131 |
+
if prompt:
|
132 |
res = compute(prompt, top_p=0.92, top_k=0, do_sample=True, max_length=300, min_length=0)
|
133 |
st.code(res, language="python")
|
134 |
|