-
Notifications
You must be signed in to change notification settings - Fork 2
/
text_generation.tscn
142 lines (123 loc) · 4.23 KB
/
text_generation.tscn
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
[gd_scene load_steps=6 format=3 uid="uid://3fa6y5am1553"]
[ext_resource type="Script" path="res://text_generation.gd" id="1_jujmh"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jxcje"]
bg_color = Color(0.223103, 0.223103, 0.223103, 1)
[sub_resource type="Theme" id="Theme_xu5is"]
default_font_size = 32
[sub_resource type="Theme" id="Theme_taf62"]
default_font_size = 32
[sub_resource type="Theme" id="Theme_pkcjd"]
default_font_size = 32
[node name="TextGeneration" type="Node"]
script = ExtResource("1_jujmh")
[node name="Llama" type="GDLlama" parent="."]
model_path = "models/Meta-Llama-3-8B-Instruct.Q5_K_M.gguf"
n_keep = 128
n_gpu_layer = 33
[node name="Prompt" type="TextEdit" parent="."]
custom_minimum_size = Vector2(1000, 300)
offset_right = 8.0
offset_bottom = 8.0
theme_override_font_sizes/font_size = 32
placeholder_text = "Prompt"
[node name="GeneratedText" type="RichTextLabel" parent="."]
custom_minimum_size = Vector2(1600, 500)
offset_top = 400.0
offset_right = 1600.0
offset_bottom = 900.0
focus_mode = 2
theme_override_font_sizes/normal_font_size = 32
theme_override_styles/normal = SubResource("StyleBoxFlat_jxcje")
text = "Generated Text"
scroll_following = true
selection_enabled = true
[node name="GenerateButton" type="Button" parent="."]
offset_left = 1068.0
offset_top = 40.0
offset_right = 1297.0
offset_bottom = 135.0
theme_override_font_sizes/font_size = 32
text = "Generate"
[node name="ContinueButton" type="Button" parent="."]
offset_left = 1068.0
offset_top = 170.0
offset_right = 1297.0
offset_bottom = 265.0
theme_override_font_sizes/font_size = 32
text = "Continue
"
[node name="StopGenerateButton" type="Button" parent="."]
offset_left = 1354.0
offset_top = 40.0
offset_right = 1583.0
offset_bottom = 135.0
theme_override_font_sizes/font_size = 32
text = "Stop
"
[node name="InteractOption" type="OptionButton" parent="."]
offset_left = 1363.0
offset_top = 191.0
offset_right = 1578.0
offset_bottom = 250.0
theme = SubResource("Theme_xu5is")
theme_override_font_sizes/font_size = 32
item_count = 3
selected = 0
fit_to_longest_item = false
popup/item_0/text = "Simple"
popup/item_0/id = 0
popup/item_1/text = "Instruct"
popup/item_1/id = 1
popup/item_2/text = "Interactive"
popup/item_2/id = 2
[node name="SchemaOption" type="OptionButton" parent="."]
offset_left = 1363.0
offset_top = 300.0
offset_right = 1578.0
offset_bottom = 353.0
theme = SubResource("Theme_taf62")
item_count = 2
selected = 0
popup/item_0/text = "None"
popup/item_0/id = 0
popup/item_1/text = "Person"
popup/item_1/id = 1
[node name="ModelButton" type="Button" parent="."]
offset_left = 16.0
offset_top = 338.0
offset_right = 73.0
offset_bottom = 369.0
text = "Model"
[node name="ModelChooser" type="FileDialog" parent="."]
title = "Open a File"
initial_position = 1
size = Vector2i(671, 600)
theme = SubResource("Theme_pkcjd")
ok_button_text = "Open"
file_mode = 0
access = 2
[node name="ModelPathLabel" type="Label" parent="."]
offset_left = 84.0
offset_top = 340.0
offset_right = 124.0
offset_bottom = 363.0
[node name="BackButton" type="Button" parent="."]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -45.0
offset_bottom = 31.0
grow_horizontal = 0
text = "Back
"
[connection signal="generate_text_finished" from="Llama" to="." method="_on_llama_generate_text_finished"]
[connection signal="generate_text_updated" from="Llama" to="." method="_on_llama_generate_text_updated"]
[connection signal="input_wait_started" from="Llama" to="." method="_on_llama_input_wait_started"]
[connection signal="pressed" from="GenerateButton" to="." method="_on_generate_button_pressed"]
[connection signal="pressed" from="ContinueButton" to="." method="_on_continue_button_pressed"]
[connection signal="pressed" from="StopGenerateButton" to="." method="_on_stop_generate_button_pressed"]
[connection signal="item_selected" from="InteractOption" to="." method="_on_interact_option_item_selected"]
[connection signal="item_selected" from="SchemaOption" to="." method="_on_schema_option_item_selected"]
[connection signal="pressed" from="ModelButton" to="." method="_on_model_button_pressed"]
[connection signal="file_selected" from="ModelChooser" to="." method="_on_model_chooser_file_selected"]
[connection signal="pressed" from="BackButton" to="." method="_on_back_button_pressed"]