Sina1138 commited on
Commit ·
d8a10a2
1
Parent(s): 00600ba
Fix documentation and update model paths
Browse files- interface/Demo.py +4 -16
interface/Demo.py
CHANGED
|
@@ -51,14 +51,11 @@ topic_color_map = {
|
|
| 51 |
# GLIMPSE Home/Description Page
|
| 52 |
glimpse_description = """
|
| 53 |
# ReView: A Tool for Visualizing and Analyzing Scientific Reviews
|
| 54 |
-
|
| 55 |
-
## Overview
|
| 56 |
ReView is a visualization tool designed to assist **area chairs** and **researchers** in efficiently analyzing scholarly reviews. The interface offers two main ways to explore scholarly reviews:
|
| 57 |
- Pre-Processed Reviews: Explore real peer reviews from ICLR (2017–2021) with structured visualizations of sentiment, topics, and reviewer agreement.
|
| 58 |
- Interactive Tab: Enter your own reviews and view them analyzed in real time using the same NLP-powered highlighting options.
|
| 59 |
-
|
| 60 |
All reviews are shown in their original, unaltered form, with visual overlays to help identify key insights such as disagreements, sentiment and common themes—reducing cognitive load and scrolling effort.
|
| 61 |
-
|
| 62 |
---
|
| 63 |
## **Key Features**
|
| 64 |
- *Traceability and Transparency:* The tool preserves the original text of each review and overlays highlights for key aspects (e.g., sentiment, topic, agreement), allowing area chairs to trace back every insight to its source without modifying or summarizing the content.
|
|
@@ -69,17 +66,11 @@ All reviews are shown in their original, unaltered form, with visual overlays to
|
|
| 69 |
- *Agreement:* Identifies both shared and conflicting points across reviews, helping to surface consensus and disagreement.
|
| 70 |
- *Polarity:* Highlights positive and negative sentiments within the reviews to reveal tone and stance.
|
| 71 |
- *Topic:* Organizes the review sentences by their discussed topics, ensuring coverage of diverse reviewer perspectives and improving clarity.
|
| 72 |
-
|
| 73 |
---
|
| 74 |
-
|
| 75 |
### How to Use ReView
|
| 76 |
-
|
| 77 |
ReView offers two main ways to explore peer reviews: using pre-processed reviews or by entering your own.
|
| 78 |
-
|
| 79 |
#### 🗂️ Pre-Processed Reviews Tab
|
| 80 |
-
|
| 81 |
Use this tab to explore reviews from ICLR (2017–2021):
|
| 82 |
-
|
| 83 |
1. **Select a conference year** from the dropdown menu on the right.
|
| 84 |
2. **Navigate between submissions** using the *Next* and *Previous* buttons on the left.
|
| 85 |
3. **Choose a highlighting view** using the radio buttons:
|
|
@@ -87,11 +78,8 @@ Use this tab to explore reviews from ICLR (2017–2021):
|
|
| 87 |
- **Agreement**: Highlights consensus points in **red** and disagreements in **purple**.
|
| 88 |
- **Polarity**: Highlights **positive** sentiment in **green** and **negative** sentiment in **red**.
|
| 89 |
- **Topic**: Highlights comments by discussion topic using color-coded labels.
|
| 90 |
-
|
| 91 |
#### ✍️ Interactive Tab
|
| 92 |
-
|
| 93 |
Use this tab to analyze your own review text:
|
| 94 |
-
|
| 95 |
1. **Enter up to three reviews** in the input fields labeled *Review 1*, *Review 2*, and *Review 3*.
|
| 96 |
2. **Click "Process"** to analyze the input (average processing time: ~42 seconds).
|
| 97 |
3. **Explore the results** using the same highlighting options as above (Agreement, Polarity, Topic).
|
|
@@ -123,7 +111,7 @@ def summarize(text1, text2, text3, focus, mode, rationality=1.0, iterations=1):
|
|
| 123 |
sentences = list(set(text1_sentences + text2_sentences + text3_sentences))
|
| 124 |
|
| 125 |
# Load polarity model and tokenizer (SciBERT)
|
| 126 |
-
polarity_model_path = "
|
| 127 |
polarity_tokenizer = AutoTokenizer.from_pretrained(polarity_model_path)
|
| 128 |
polarity_model = AutoModelForSequenceClassification.from_pretrained(polarity_model_path)
|
| 129 |
polarity_model.eval()
|
|
@@ -146,7 +134,7 @@ def summarize(text1, text2, text3, focus, mode, rationality=1.0, iterations=1):
|
|
| 146 |
|
| 147 |
|
| 148 |
# Load topic model and tokenizer (SciBERT)
|
| 149 |
-
topic_model_path = "
|
| 150 |
topic_tokenizer = AutoTokenizer.from_pretrained(topic_model_path)
|
| 151 |
topic_model = AutoModelForSequenceClassification.from_pretrained(topic_model_path)
|
| 152 |
topic_model.eval()
|
|
@@ -797,4 +785,4 @@ with gr.Blocks(title="ReView") as demo:
|
|
| 797 |
outputs=[review_id, review1, review2, review3, review4, review5, review6, review7, review8, most_common_sentences, most_unique_sentences, topic_text_box, state]
|
| 798 |
)
|
| 799 |
|
| 800 |
-
demo.launch(share=False)
|
|
|
|
| 51 |
# GLIMPSE Home/Description Page
|
| 52 |
glimpse_description = """
|
| 53 |
# ReView: A Tool for Visualizing and Analyzing Scientific Reviews
|
| 54 |
+
## **Overview**
|
|
|
|
| 55 |
ReView is a visualization tool designed to assist **area chairs** and **researchers** in efficiently analyzing scholarly reviews. The interface offers two main ways to explore scholarly reviews:
|
| 56 |
- Pre-Processed Reviews: Explore real peer reviews from ICLR (2017–2021) with structured visualizations of sentiment, topics, and reviewer agreement.
|
| 57 |
- Interactive Tab: Enter your own reviews and view them analyzed in real time using the same NLP-powered highlighting options.
|
|
|
|
| 58 |
All reviews are shown in their original, unaltered form, with visual overlays to help identify key insights such as disagreements, sentiment and common themes—reducing cognitive load and scrolling effort.
|
|
|
|
| 59 |
---
|
| 60 |
## **Key Features**
|
| 61 |
- *Traceability and Transparency:* The tool preserves the original text of each review and overlays highlights for key aspects (e.g., sentiment, topic, agreement), allowing area chairs to trace back every insight to its source without modifying or summarizing the content.
|
|
|
|
| 66 |
- *Agreement:* Identifies both shared and conflicting points across reviews, helping to surface consensus and disagreement.
|
| 67 |
- *Polarity:* Highlights positive and negative sentiments within the reviews to reveal tone and stance.
|
| 68 |
- *Topic:* Organizes the review sentences by their discussed topics, ensuring coverage of diverse reviewer perspectives and improving clarity.
|
|
|
|
| 69 |
---
|
|
|
|
| 70 |
### How to Use ReView
|
|
|
|
| 71 |
ReView offers two main ways to explore peer reviews: using pre-processed reviews or by entering your own.
|
|
|
|
| 72 |
#### 🗂️ Pre-Processed Reviews Tab
|
|
|
|
| 73 |
Use this tab to explore reviews from ICLR (2017–2021):
|
|
|
|
| 74 |
1. **Select a conference year** from the dropdown menu on the right.
|
| 75 |
2. **Navigate between submissions** using the *Next* and *Previous* buttons on the left.
|
| 76 |
3. **Choose a highlighting view** using the radio buttons:
|
|
|
|
| 78 |
- **Agreement**: Highlights consensus points in **red** and disagreements in **purple**.
|
| 79 |
- **Polarity**: Highlights **positive** sentiment in **green** and **negative** sentiment in **red**.
|
| 80 |
- **Topic**: Highlights comments by discussion topic using color-coded labels.
|
|
|
|
| 81 |
#### ✍️ Interactive Tab
|
|
|
|
| 82 |
Use this tab to analyze your own review text:
|
|
|
|
| 83 |
1. **Enter up to three reviews** in the input fields labeled *Review 1*, *Review 2*, and *Review 3*.
|
| 84 |
2. **Click "Process"** to analyze the input (average processing time: ~42 seconds).
|
| 85 |
3. **Explore the results** using the same highlighting options as above (Agreement, Polarity, Topic).
|
|
|
|
| 111 |
sentences = list(set(text1_sentences + text2_sentences + text3_sentences))
|
| 112 |
|
| 113 |
# Load polarity model and tokenizer (SciBERT)
|
| 114 |
+
polarity_model_path = "Sina1138/Scibert_polarity_Review"
|
| 115 |
polarity_tokenizer = AutoTokenizer.from_pretrained(polarity_model_path)
|
| 116 |
polarity_model = AutoModelForSequenceClassification.from_pretrained(polarity_model_path)
|
| 117 |
polarity_model.eval()
|
|
|
|
| 134 |
|
| 135 |
|
| 136 |
# Load topic model and tokenizer (SciBERT)
|
| 137 |
+
topic_model_path = "Sina1138/SciDeberta_Review"
|
| 138 |
topic_tokenizer = AutoTokenizer.from_pretrained(topic_model_path)
|
| 139 |
topic_model = AutoModelForSequenceClassification.from_pretrained(topic_model_path)
|
| 140 |
topic_model.eval()
|
|
|
|
| 785 |
outputs=[review_id, review1, review2, review3, review4, review5, review6, review7, review8, most_common_sentences, most_unique_sentences, topic_text_box, state]
|
| 786 |
)
|
| 787 |
|
| 788 |
+
demo.launch(share=False)
|