nafisehNik commited on
Commit
0008647
Β·
1 Parent(s): 1f845b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -43
app.py CHANGED
@@ -11,49 +11,6 @@ import streamlit as st
11
  import pandas as pd
12
  import base64
13
 
14
- st.markdown(
15
- """
16
- <style>
17
- [data-testid="stSidebar"][aria-expanded="true"]{
18
- min-width: 450px;
19
- max-width: 450px;
20
- }
21
- """,
22
- unsafe_allow_html=True)
23
-
24
-
25
- with st.sidebar:
26
- st.title(" πŸ”§ Settings")
27
-
28
- with st.expander("πŸ— Issue Template Inputs", True):
29
-
30
- in_name = st.text_input("Name Metadata: ", placeholder="e.g., Bug Report or Feqture Request or Question", on_change=None)
31
- in_about = st.text_input("About Metadata: ", placeholder="e.g., File a bug report", on_change=None)
32
- in_title = st.text_input("Title Metadata: ", placeholder="e.g., [Bug]: ", on_change=None)
33
- in_labels = st.text_input("Labels Metadata: ", placeholder="e.g., feature, enhancement", on_change=None)
34
- in_assignees = st.text_input("Assignees Metadata: ", placeholder="e.g., USER_1, USER_2", on_change=None)
35
-
36
- # if no headlines is selected, force the headlines to be empty as well.
37
- option = st.selectbox(
38
- 'How would you like to be Your Heders?',
39
- ('**Emphasis**', '# Header', 'No headlines'))
40
-
41
- in_headlines = st.text_area("Headlines: ", placeholder="Enter each headline in one line.", on_change=None, height=200)
42
-
43
- df = pd.DataFrame(
44
- [{"headline": "Welcome"},{"command": "Concise Description"}, {"command": "Additional Info"},])
45
- in_headlines = st.experimental_data_editor(df, num_rows="dynamic")
46
-
47
- in_summary = st.text_area("Summary: ", placeholder="This Github Issue Template is ...", on_change=None, height=200)
48
-
49
-
50
- with st.expander("πŸŽ› Model Configs", False):
51
- max_length = st.slider("max_length", 30, 512, 300)
52
- min_length = st.slider("min_length", 0, 300, 30)
53
- top_p = st.slider("top_p", 0.0, 1.0, 0.92)
54
- top_k = st.slider("top_k", 0, 100, 0)
55
-
56
-
57
 
58
  @st.cache_data
59
  def render_svg(svg):
@@ -114,6 +71,49 @@ st.markdown("[![Duplicate Space](https://img.shields.io/badge/-Duplicate%20Space
114
 
115
  render_svg(open("assets/logo.svg").read())
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  tab1, tab2 = st.tabs(["Design GitHub Issue Template", "Manual Prompt"])
118
 
119
  with tab1:
 
11
  import pandas as pd
12
  import base64
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  @st.cache_data
16
  def render_svg(svg):
 
71
 
72
  render_svg(open("assets/logo.svg").read())
73
 
74
+ st.markdown(
75
+ """
76
+ <style>
77
+ [data-testid="stSidebar"][aria-expanded="true"]{
78
+ min-width: 450px;
79
+ max-width: 450px;
80
+ }
81
+ """,
82
+ unsafe_allow_html=True)
83
+
84
+
85
+ with st.sidebar:
86
+ st.title(" πŸ”§ Settings")
87
+
88
+ with st.expander("πŸ— Issue Template Inputs", True):
89
+
90
+ in_name = st.text_input("Name Metadata: ", placeholder="e.g., Bug Report or Feqture Request or Question", on_change=None)
91
+ in_about = st.text_input("About Metadata: ", placeholder="e.g., File a bug report", on_change=None)
92
+ in_title = st.text_input("Title Metadata: ", placeholder="e.g., [Bug]: ", on_change=None)
93
+ in_labels = st.text_input("Labels Metadata: ", placeholder="e.g., feature, enhancement", on_change=None)
94
+ in_assignees = st.text_input("Assignees Metadata: ", placeholder="e.g., USER_1, USER_2", on_change=None)
95
+
96
+ # if no headlines is selected, force the headlines to be empty as well.
97
+ option = st.selectbox(
98
+ 'How would you like to be Your Heders?',
99
+ ('**Emphasis**', '# Header', 'No headlines'))
100
+
101
+ in_headlines = st.text_area("Headlines: ", placeholder="Enter each headline in one line. e.g.,\nWelcome\nConcise Description\nAdditional Info", on_change=None, height=200)
102
+
103
+ # df = pd.DataFrame(
104
+ # [{"headline": "Welcome"},{"headline": "Concise Description"}, {"headline": "Additional Info"}])
105
+ # in_headlines = st.experimental_data_editor(df, num_rows="dynamic")
106
+
107
+ in_summary = st.text_area("Summary: ", placeholder="This Github Issue Template is ...", on_change=None, height=200)
108
+
109
+
110
+ with st.expander("πŸŽ› Model Configs", False):
111
+ max_length = st.slider("max_length", 30, 512, 300)
112
+ min_length = st.slider("min_length", 0, 300, 30)
113
+ top_p = st.slider("top_p", 0.0, 1.0, 0.92)
114
+ top_k = st.slider("top_k", 0, 100, 0)
115
+
116
+
117
  tab1, tab2 = st.tabs(["Design GitHub Issue Template", "Manual Prompt"])
118
 
119
  with tab1: