File size: 666 Bytes
a3634c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import streamlit as st




if __name__ == '__main__':
    title = st.text_input("title", value="מירי_רגב")
    # check if is it link to a page , if so, extract title
    if title.startswith("https://"):
        title = title.split("/")[-1]
    from wikitalk_parser import get_wikitalk_from_api
    
    language = st.text_input("language", value="he")


    if st.button("get talk"):
        discussions = get_wikitalk_from_api(title, language=language)
        output = json.dumps(discussions, ensure_ascii=False, indent=4)
        st.json(output)

        st.text_area("raw_output", value=output)