Charles De Dampierre commited on
Commit
7f5ac1f
·
1 Parent(s): daea89d

add Use Case

Browse files
.DS_Store ADDED
Binary file (6.15 kB). View file
 
app.py CHANGED
@@ -1,16 +1,55 @@
1
  import streamlit as st
2
 
 
 
 
 
3
 
4
- # Description on the left side
5
- st.sidebar.title('Description')
6
- st.sidebar.write("Bunka Summarize & Visualize Information as a Cartography. The current Dataset is the following one: https://huggingface.co/datasets/yitingxie/rlhf-reward-datasets.")
7
- st.sidebar.write("Have a look at the following package on GitHub: https://github.com/charlesdedampierre/BunkaTopics")
8
- st.title('Bunka Map')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  # Path to the HTML file containing the Plotly figure
11
- html_file_path = "test.html" # Replace with your HTML file path
 
 
12
 
13
  # Use the 'st.components' function to embed the HTML content
14
- with open(html_file_path, 'r') as f:
15
- html = f.read()
16
- st.components.v1.html(html, width=800, height=800)
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
+ st.sidebar.image("images/logo.png", use_column_width=True)
4
+ st.sidebar.write(
5
+ "Bunka Summarizes & Visualizes Information as Maps using LLMs. The current Dataset is the following one: https://huggingface.co/datasets/Anthropic/hh-rlhf"
6
+ )
7
 
8
+ st.sidebar.title("Github Page")
9
+ st.sidebar.write(
10
+ "Have a look at the following package on GitHub: https://github.com/charlesdedampierre/BunkaTopics"
11
+ )
12
+
13
+ st.sidebar.title("Dataset")
14
+ st.sidebar.write("HH-RLHF Dataset: https://huggingface.co/datasets/Anthropic/hh-rlhf")
15
+
16
+ st.title("How to understand large textual datasets?")
17
+
18
+ import pandas as pd
19
+
20
+ df = pd.read_csv("data/rejection-sampling.csv", index_col=[0])
21
+ st.dataframe(df, use_container_width=True)
22
+
23
+ st.title("Bunka Map")
24
+
25
+
26
+ # Path to the HTML file containing the Plotly figure
27
+ bunka_map_path = "maps/bunka_map.html" # Replace with your HTML file path
28
+
29
+ # Use the 'st.components' function to embed the HTML content
30
+ with open(bunka_map_path, "r") as f:
31
+ bunka_map_html = f.read()
32
+
33
+ st.components.v1.html(bunka_map_html, width=800, height=800)
34
+
35
+ st.title("Framing Analysis")
36
 
37
  # Path to the HTML file containing the Plotly figure
38
+ bunka_map_path = (
39
+ "maps/bourdieu_priacy_politics.html" # Replace with your HTML file path
40
+ )
41
 
42
  # Use the 'st.components' function to embed the HTML content
43
+ with open(bunka_map_path, "r") as f:
44
+ bunka_map_html = f.read()
45
+
46
+ st.components.v1.html(bunka_map_html, width=800, height=800)
47
+
48
+ # Path to the HTML file containing the Plotly figure
49
+ bunka_map_path = "maps/violence_men_women.html" # Replace with your HTML file path
50
+
51
+ # Use the 'st.components' function to embed the HTML content
52
+ with open(bunka_map_path, "r") as f:
53
+ bunka_map_html = f.read()
54
+
55
+ st.components.v1.html(bunka_map_html, width=800, height=800)
data/rejection-sampling.csv ADDED
The diff for this file is too large to render. See raw diff
 
images/logo.png ADDED
images/pipeline.png ADDED
maps/bourdieu_priacy_politics.html ADDED
The diff for this file is too large to render. See raw diff
 
test.html → maps/bunka_map.html RENAMED
The diff for this file is too large to render. See raw diff
 
maps/violence_men_women.html ADDED
The diff for this file is too large to render. See raw diff