File size: 1,884 Bytes
32f0b26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<script lang="ts">
    import { onMount } from "svelte";
	import IterativeClustering from "./IterativeClustering.svelte";
	import Button, { Label } from "@smui/button";
	import Textfield from '@smui/textfield';
	import LinearProgress from "@smui/linear-progress";

    export let ind;
	export let hunch;
	export let model;
	export let topic;

	let example_block = false;
	let clusters;

	function getAuditSettings() {
		fetch("./audit_settings")
			.then((r) => r.text())
			.then(function (r_orig) {
				let r = JSON.parse(r_orig);
				clusters = r["clusters"];
			});
	}
	onMount(async () => {
		getAuditSettings();
	});

	function handleTestOnExamples() {
		example_block = true;
	}
</script>

<div>
	<div>
		<!-- <h6>Hunch {ind + 1}</h6> -->
		<h6>Topic:</h6>
		{topic}
	</div>
	<div class="spacing_vert">
		<h6>Your summary/suggestions:</h6>
		<Textfield
			style="width: 100%;"
			helperLine$style="width: 100%;"
			textarea
			bind:value={hunch}
			label="My current hunch is that..."
		>
		</Textfield>
		<!-- <Button
			on:click={handleTestOnExamples}
			class="button_float_right spacing_vert"
			variant="outlined"
		>
			<Label>Test on examples</Label>
		</Button> -->
	</div>

	<div class="spacing_vert">
        <Button on:click={null} variant="outlined">
            <Label>Save</Label>
        </Button>
        <Button on:click={null} variant="outlined">
            <Label>Submit</Label>
        </Button>
    </div>

	<!-- {#await example_block}
        <div class="app_loading">
            <LinearProgress indeterminate />
        </div>
    {:then} -->
		<!-- {#if example_block}
			<IterativeClustering clusters={clusters} ind={ind + 1} personalized_model={model} />
		{/if} -->
    <!-- {:catch error}
        <p style="color: red">{error.message}</p>
    {/await} -->
</div>

<style>
	/* * {
        z-index: 11;
        overflow-x: hidden;
    } */
</style>