yirmibesogluz commited on
Commit
1035aed
·
1 Parent(s): e6bed4b

Fixed indentation..

Browse files
Files changed (1) hide show
  1. apps/home.py +25 -25
apps/home.py CHANGED
@@ -6,35 +6,35 @@ import os
6
  from .utils import query
7
 
8
  def write():
9
- st.markdown(
10
- """
11
- <h1 style="text-align:left;">TURNA</h1>
12
- """,
13
- unsafe_allow_html=True,
14
- )
15
 
16
- st.write("#")
17
 
18
- col = st.columns(2)
19
 
20
- col[0].image("images/turna-logo.png", width=100)
21
 
22
- st.markdown(
23
- """
24
 
25
- <h3 style="text-align:right;">TURNA is a Turkish encoder-decoder language model.</h3>
26
-
27
- <p style="text-align:right;"><p>
28
- <p style="text-align:right;">Use the generation paramters on the sidebar to adjust generation quality.</p>
29
- <p style="text-align:right;"><p>
30
- """,
31
- unsafe_allow_html=True,
32
- )
33
 
34
- #st.title('Turkish Language Generation')
35
- #st.write('...with Turna')
36
 
37
- # Sidebar
38
 
39
  # Taken from https://huggingface.co/spaces/flax-community/spanish-gpt2/blob/main/app.py
40
  st.sidebar.subheader("Configurable parameters")
@@ -78,10 +78,10 @@ def write():
78
  )
79
 
80
  input_text = st.text_area(label='Enter a text: ', height=100,
81
- value="Türkiye'nin başkenti neresidir?")
82
- url = "https://api-inference.huggingface.co/models/boun-tabi-LMG/TURNA"
83
  params = {"length_penalty": length_penalty, "no_repeat_ngram_size": no_repeat_ngram_size, "max_new_tokens": max_new_tokens,
84
- "do_sample":do_sample, "num_beams":num_beams, "repetition_penalty":repetition_penalty }
85
  if st.button("Generate"):
86
  with st.spinner('Generating...'):
87
  output = query(input_text, url, params)
 
6
  from .utils import query
7
 
8
  def write():
9
+ st.markdown(
10
+ """
11
+ <h1 style="text-align:left;">TURNA</h1>
12
+ """,
13
+ unsafe_allow_html=True,
14
+ )
15
 
16
+ st.write("#")
17
 
18
+ col = st.columns(2)
19
 
20
+ col[0].image("images/turna-logo.png", width=100)
21
 
22
+ st.markdown(
23
+ """
24
 
25
+ <h3 style="text-align:right;">TURNA is a Turkish encoder-decoder language model.</h3>
26
+
27
+ <p style="text-align:right;"><p>
28
+ <p style="text-align:right;">Use the generation paramters on the sidebar to adjust generation quality.</p>
29
+ <p style="text-align:right;"><p>
30
+ """,
31
+ unsafe_allow_html=True,
32
+ )
33
 
34
+ #st.title('Turkish Language Generation')
35
+ #st.write('...with Turna')
36
 
37
+ # Sidebar
38
 
39
  # Taken from https://huggingface.co/spaces/flax-community/spanish-gpt2/blob/main/app.py
40
  st.sidebar.subheader("Configurable parameters")
 
78
  )
79
 
80
  input_text = st.text_area(label='Enter a text: ', height=100,
81
+ value="Türkiye'nin başkenti neresidir?")
82
+ url = "https://api-inference.huggingface.co/models/boun-tabi-LMG/TURNA"
83
  params = {"length_penalty": length_penalty, "no_repeat_ngram_size": no_repeat_ngram_size, "max_new_tokens": max_new_tokens,
84
+ "do_sample":do_sample, "num_beams":num_beams, "repetition_penalty":repetition_penalty }
85
  if st.button("Generate"):
86
  with st.spinner('Generating...'):
87
  output = query(input_text, url, params)