yirmibesogluz commited on
Commit
6a06cf4
·
1 Parent(s): 2e5d594

Modified file structure

Browse files
Files changed (3) hide show
  1. app.py +1 -2
  2. pages/home.py +0 -15
  3. pages/turna.py +32 -8
app.py CHANGED
@@ -11,8 +11,7 @@ st.set_page_config(
11
  )
12
 
13
  PAGES = {
14
- "Home": pages.home,
15
- "Turna": pages.turna,
16
  }
17
 
18
  st.sidebar.title("Navigation")
 
11
  )
12
 
13
  PAGES = {
14
+ "Turkish Language Generation": pages.turna,
 
15
  }
16
 
17
  st.sidebar.title("Navigation")
pages/home.py DELETED
@@ -1,15 +0,0 @@
1
- import streamlit as st
2
- import awesome_streamlit as ast
3
-
4
-
5
- def write():
6
-
7
- st.markdown(
8
- """
9
- # ![](images/turna-logo.png) TURNA
10
- ## A Turkish Encoder-Decoder Language Model for Enhanced Understanding and Generation
11
-
12
- Check the **Navigation bar** to test our models:
13
- - TURNA: a 1.1B parameter Turkish encoder-decoder language model
14
- """
15
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pages/turna.py CHANGED
@@ -6,15 +6,39 @@ API_URL = "https://api-inference.huggingface.co/models/boun-tabi-LMG/TURNA"
6
 
7
  def write():
8
 
9
- st.title('Turkish Language Generation')
10
- st.write('...with Turna')
11
- input_al = st.text_area(label='Enter a text: ', height=300,
12
- value="Türkiye'nin başkeni neresidir?")
13
- with st.spinner('Generating...'):
 
 
 
 
 
 
 
14
 
15
- output = query(input_al)
16
- print(output)
17
- st.success(output)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  def query(payload):
20
  while True:
 
6
 
7
  def write():
8
 
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:left;">TURNA is a Turkish encoder-decoder language model.</h3>
26
+
27
+ <p style="text-align:left;"><p>
28
+ <p style="text-align:left;">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
+ input_al = st.text_area(label='Enter a text: ', height=100,
37
+ value="Türkiye'nin başkeni neresidir?")
38
+ if st.button("Generate"):
39
+ with st.spinner('Generating...'):
40
+ output = query(input_al)
41
+ st.success(output)
42
 
43
  def query(payload):
44
  while True: