Spaces:
Runtime error
Runtime error
Rename templates to templates/index.html
Browse files- templates +0 -0
- templates/index.html +55 -0
templates
DELETED
File without changes
|
templates/index.html
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Transformer Dialogue Processor</title>
|
7 |
+
</head>
|
8 |
+
<body>
|
9 |
+
<h1>Transformer Dialogue Processor</h1>
|
10 |
+
<p>Welcome to the Transformer Dialogue Processor! This app allows you to process dialogues using advanced AI models. You can classify the user persona in a dialogue and generate AI-based nudges to depolarize conversations. Please follow the steps below:</p>
|
11 |
+
|
12 |
+
<ol>
|
13 |
+
<li>Select a model for classifying user personas. This model will identify the tone or persona of the user in each dialogue.</li>
|
14 |
+
<li>Select a model for generating nudges. This model will suggest responses aimed at reducing polarization in the conversation.</li>
|
15 |
+
<li>Choose whether to upload your own CSV file or to use a predefined dataset.</li>
|
16 |
+
<li>Click 'Process' to start. Note that processing may take some time, especially with larger datasets.</li>
|
17 |
+
</ol>
|
18 |
+
|
19 |
+
<p><strong>Important:</strong> The processing time can vary depending on the selected models and the size of the data. Please be patient as the app works through your request.</p>
|
20 |
+
|
21 |
+
<form method="post" enctype="multipart/form-data">
|
22 |
+
<label for="persona_model_name">Select Transformer Model for Persona Classification:</label>
|
23 |
+
<select id="persona_model_name" name="persona_model_name">
|
24 |
+
<option value="roberta-base">RoBERTa</option>
|
25 |
+
<option value="bert-base-uncased">BERT</option>
|
26 |
+
<option value="gpt2">GPT-2</option>
|
27 |
+
</select>
|
28 |
+
<br><br>
|
29 |
+
|
30 |
+
<label for="nudge_model_name">Select Transformer Model for Nudge Generation:</label>
|
31 |
+
<select id="nudge_model_name" name="nudge_model_name">
|
32 |
+
<option value="facebook/bart-large-cnn">BART</option>
|
33 |
+
<option value="t5-small">T5</option>
|
34 |
+
<option value="gpt2">GPT-2</option>
|
35 |
+
</select>
|
36 |
+
<br><br>
|
37 |
+
|
38 |
+
<label for="use_online_dataset">Use Online Dataset:</label>
|
39 |
+
<input type="checkbox" id="use_online_dataset" name="use_online_dataset" value="yes">
|
40 |
+
<label for="dataset_name">Select Dataset:</label>
|
41 |
+
<select id="dataset_name" name="dataset_name">
|
42 |
+
<option value="AlekseyKorshuk/persona-chat">Persona-Chat</option>
|
43 |
+
<option value="dailydialog">DailyDialog</option>
|
44 |
+
<option value="empathetic_dialogues">Empathetic Dialogues</option>
|
45 |
+
</select>
|
46 |
+
<br><br>
|
47 |
+
|
48 |
+
<label for="file">Or Upload Your CSV file:</label>
|
49 |
+
<input type="file" id="file" name="file" accept=".csv">
|
50 |
+
<br><br>
|
51 |
+
|
52 |
+
<input type="submit" value="Process">
|
53 |
+
</form>
|
54 |
+
</body>
|
55 |
+
</html>
|