-
-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
13 changed files
with
9,681 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import os | ||
from os.path import join | ||
|
||
import streamlit as st | ||
import streamlit.components.v1 as components | ||
|
||
st.set_page_config( | ||
page_title="Dictionary App", | ||
layout="wide", | ||
) | ||
|
||
json_viewer_build_dir = join( | ||
os.path.dirname(os.path.abspath(__file__)), | ||
"components", "json_viewer", "component", "frontend", "build" | ||
) | ||
json_viewer = components.declare_component( | ||
"json_viewer", | ||
path=json_viewer_build_dir | ||
) | ||
|
||
# SIDEBAR | ||
add_selectbox = st.sidebar.text_input('Word', value="gà") | ||
|
||
# MAIN | ||
st.write('# Dictionary') | ||
st.text_input('Word', key=1, value="gà") | ||
data = [ | ||
{ | ||
"description": "(Động vật học) Loài chim nuôi (gia cầm) để lấy thịt và trứng, bay kém, mỏ cứng, con trống có cựa và biết gáy.", | ||
"tag": "noun", | ||
"examples": [ | ||
"Bán gà ngày gió, bán chó ngày mưa. (tục ngữ)", | ||
"Gà người gáy, gà nhà ta sáng. (tục ngữ)" | ||
] | ||
}, | ||
{ | ||
"description": "Đánh cuộc riêng trong một ván bài tổ tôm hay tài bàn ngoài số tiền góp chính", | ||
"tag": "verb", | ||
"examples": [ | ||
"Gà lần nào cũng thua thì đánh làm gì." | ||
] | ||
} | ||
] | ||
|
||
output_data = json_viewer(json_object=data, label=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
apps/components/json_viewer/component/frontend/build/asset-manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"files": { | ||
"main.js": "./static/js/main.ee7180e8.chunk.js", | ||
"main.js.map": "./static/js/main.ee7180e8.chunk.js.map", | ||
"runtime-main.js": "./static/js/runtime-main.723788a6.js", | ||
"runtime-main.js.map": "./static/js/runtime-main.723788a6.js.map", | ||
"static/js/2.5b8594be.chunk.js": "./static/js/2.5b8594be.chunk.js", | ||
"static/js/2.5b8594be.chunk.js.map": "./static/js/2.5b8594be.chunk.js.map", | ||
"index.html": "./index.html", | ||
"precache-manifest.98ae7f8f21e9dfea38c2aa5dcc10e9eb.js": "./precache-manifest.98ae7f8f21e9dfea38c2aa5dcc10e9eb.js", | ||
"service-worker.js": "./service-worker.js", | ||
"static/js/2.5b8594be.chunk.js.LICENSE.txt": "./static/js/2.5b8594be.chunk.js.LICENSE.txt" | ||
}, | ||
"entrypoints": [ | ||
"static/js/runtime-main.723788a6.js", | ||
"static/js/2.5b8594be.chunk.js", | ||
"static/js/main.ee7180e8.chunk.js" | ||
] | ||
} |
Oops, something went wrong.