File size: 8,972 Bytes
2889d8b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html lang="fr">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Patentability</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>

<body>
    <div class="container">
        <header class="header">
            <div class="logo">
                <div class="logo-icon">P</div>
                <h1>Patentability</h1>
            </div>
            <p>Enter a detailed description of your technical problem to generate search queries for finding relevant
                research papers.</p>
        </header>

        <div class="tab">
            <button class="tablinks active" onclick="openTab(event, 'tab1')" id="defaultOpen">Problem
                Descriptions</button>
            <button class="tablinks" onclick="openTab(event, 'tab2')">Insights</button>
        </div>

        <div id="tab1" class="tabcontent">
            <section class="card">
                <form id="queryForm" onsubmit="generateQueries(event)">
                    <div class="form-group">
                        <label for="userInput">Technical Problem Description:</label>
                        <div class="problem-history">
                            <textarea id="userInput" placeholder="Describe your technical problem in detail..."
                                required=""></textarea>
                        </div>
                    </div>

                    <button type="submit" class="btn btn-primary">Generate Key Issues</button>
                </form>

                <div id="keyIssuesContainer" class="key-issues-container" style="display: none;">

                </div>
            </section>

            <section class="card" id="probDescCards" style="display: none;">
                <div id="probDescContainer" class="prob-desc-container">

                </div>
            </section>
        </div>

        <div id="tab2" class="tabcontent">

            <section class="card">
                <div class="form-group">
                    <label for="userProblemDescription">Technical Problem Description:</label>
                    <div class="problem-history">
                        <div id="problemHistoryNav" class="problem-history-nav" style="display: none;">
                            <div class="history-arrow history-prev disabled" onclick="navigateProblemHistory('prev')">←</div>
                            <div class="history-arrow history-next disabled" onclick="navigateProblemHistory('next')">β†’</div>
                            <div class="history-status"></div>
                        </div>
                        <textarea id="userProblemDescription" placeholder="Select one of the generated problem descripition..." required disabled></textarea>
                    </div>
                </div>

                <div id="loadingIndicator">
                    <div class="loading-spinner"></div>
                    <p>Generating search queries... Please wait.</p>
                </div>

                <div id="refinedProblemContainer" class="refined-problem-container" style="display: none;">
                    <div id="refinedProblemTabs" class="refined-problem-tabs"></div>
                    <div id="refinedProblemContent" class="refined-problem-content"></div>
                </div>
            </section>

            <section class="search-options">
                <label>Search Options:</label>
                <div class="checkbox-group">
                    <div class="checkbox-item">
                        <input type="checkbox" id="pdfOption" name="searchOptions" value="pdf" checked>
                        <label for="pdfOption">PDF</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="patentOption" name="searchOptions" value="patent">
                        <label for="patentOption">Patent</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="webOption" name="searchOptions" value="web">
                        <label for="webOption">Web</label>
                    </div>
                </div>
            </section>

            <section id="resultsContainer">
                <h2>Generated Search Queries</h2>
                
                <div id="queriesContainer">
                    <!-- Query fields will be added here dynamically -->
                </div>
                
                <div class="button-container">
                    <button type="button" class="btn btn-secondary" onclick="addQueryField()">
                        <span>Add New Query</span>
                    </button>
                </div>
            </section>

            <div class="ribbon-accordion collapsed">
                <div class="ribbon-header">
                    <div class="ribbon-title">
                        <span class="ribbon-icon">🧰</span>
                        <span>Patentability Tools</span>
                    </div>
                    <div class="ribbon-toggle">β–²</div>
                </div>
                <div class="ribbon-content">
                    <div class="progress-bar-container">
                        <div class="progress-bar"></div>
                    </div>
                    <div class="progress-step">Waiting to start...</div>
                    
                    <button id="ribbonGenerateQueriesButton" class="btn floating-button" style="background-color: #8e44ad; color: white;" title="Generate Search Queries">
                        Generate Search Queries
                    </button>
                    <button id="ribbonAnalyzeAllButton" class="btn btn-primary floating-button" title="Analyze All Unanalyzed Papers">
                        Analyze All
                    </button>
                    <button id="ribbonRemoveFailedButton" class="btn btn-danger floating-button" title="Remove Papers with Failed Analyses">
                        Remove Failed
                    </button>
                    <button id="ribbonExtractAllInsightsButton" class="btn btn-info floating-button" title="Extract Insights for All Analyzed Documents">
                        Extract All Insights
                    </button>
                    <button id="ribbonGroupInsightsButton" class="btn btn-group-insights floating-button" title="Group All Insights by Score">
                        Group Insights
                    </button>
                    <button id="ribbonEnhanceProblemButton" class="btn enhance-problem-button floating-button" title="Enhance Problem using Selected Insights">
                        Enhance Problem
                    </button>
                    <button id="ribbonExportExcelButton" class="btn btn-success floating-button" title="Export All Data to Excel">
                        Export to Excel
                    </button>
                </div>
            </div>
        </div>

        <div class="floating-buttons">
            <button id="generateQueriesButton" class="btn floating-button" style="background-color: #8e44ad; color: white;" title="Generate Search Queries">
                Generate Search Queries
            </button>
            <button id="analyzeAllButton" class="btn btn-primary floating-button" title="Analyze All Unanalyzed Papers">
                Analyze All
            </button>
            <button id="removeFailedButton" class="btn btn-danger floating-button" title="Remove Papers with Failed Analyses">
                Remove Failed
            </button>
            <button id="extractAllInsightsButton" class="btn btn-info floating-button disabled" title="Extract Insights for All Analyzed Documents" onclick="extractAllInsights()" disabled>
                Extract All Insights
            </button>
            <button id="groupInsightsByScoreButton" class="btn btn-group-insights floating-button disabled" title="Group All Insights by Score" onclick="groupInsightsByScore()" disabled>
                Group Insights
            </button>
            <button id="enhanceProblemButton" class="btn enhance-problem-button floating-button disabled" title="Enhance Problem using Selected Insights" onclick="enhanceProblem()" disabled>
                Enhance Problem
            </button>
            <button id="exportExcelButton" class="btn btn-success floating-button" title="Export All Data to Excel">
                Export to Excel
            </button>
        </div>

        <div id="globalLoadingOverlay" class="loading-overlay" style="display: none;">
            <div class="loading-content">
                <div class="loading-spinner"></div>
                <div class="progress-text"></div>
            </div>
        </div>
    </div>

    <script src="{{ url_for('static', filename='script.js') }}"></script>
</body>

</html>