You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
" examples = \"Instruction: 'Make a random sentence.'\\nAnswer: 'When I got home last night, I couldn't believe my eyes: All the pineapples had been removed from the pizza.'\"\n",
105
+
" system_message = \"You are a random sentence generator. Generate 10 diverse English sentences.\"\n",
106
+
" user_prompt = f\"Generate 10 random English sentences, like so:\\n{examples}\"\n",
" system_message = f\"You are a state-of-the art linguistic dataset compiler. You are given a 'Type' of sentence to create. \\\n",
115
+
"Within the bounds of that type, create {volume} diverse sentences with differing structures and lengths. Make the sentences plausible, \\\n",
116
+
"but be creative in filling them with random concrete information, names, and data. Here are some examples for how to go about that:\\n{examples}\\n\\\n",
117
+
"Just output one sentence per line. Do not comment or format yor output in any way, shape, or form.\"\n",
118
+
"\n",
119
+
" user_prompt = f\"Generate {volume} English sentences of the following Type: {nature}. Just output one sentence per line. \\\n",
120
+
"Do not comment or format yor output in any way, shape, or form.\"\n",
" system_message = f\"Du bist ein weltklasse Datensatz-Sammler für Sprachdaten. Du erhältst einen 'Typ' von Sätzen, die du erstellen sollst. \\\n",
128
+
"Im Rahmen dieses Typs, generiere {volume} untereinander verschiedene Sätze mit unterschiedlichen Satzlängen und -strukturen. Mache die Beispielsätze \\\n",
129
+
"plausibel, aber fülle sie kreativ mit willkürlichen Informationen, Namen, und Daten aller Art. Hier sind ein paar Beispiel, wie du vorgehen sollst:\\n{examples}\\n\\\n",
130
+
"Gib einfach einen Satz pro Zeile aus. Kommentiere oder formatiere deine Antwort in keinster Weise.\"\n",
131
+
"\n",
132
+
" user_prompt = f\"Generiere {volume} deutsche Sätze des folgenden Typs: {nature}. Gib einfach einen Satz pro Zeile aus. \\\n",
133
+
"Kommentiere oder formatiere deine Antwort in keiner Weise.\"\n",
" system_message = f\"Tu es un outil linguistique de pointe, à savoir, un genérateur de données linguistiques. Tu seras assigné un 'Type' de phrases à créer. \\\n",
141
+
"Dans le cadre de ce type-là, crée {volume} phrases diverses, avec des structures et longueurs qui varient. Génère des phrases qui soient plausibles, \\\n",
142
+
"mais sois créatif, et sers-toi de données, noms, et informations aléatoires pour rendre les phrases plus naturelles. Voici quelques examples comment faire:\\n{examples}\\n\\\n",
143
+
"Sors une seule phrase par ligne. Ne formatte ni commente ta réponse en aucune manière que ce soit.\"\n",
144
+
"\n",
145
+
" user_prompt = f\"S'il te plaît, crée {volume} phrases en français du Type suivant: {nature}. Sors une seule phrase par ligne. \\\n",
146
+
"Ne formatte ni commente ta réponse en aucune manière que ce soit.\"\n",
" title = gr.HTML(\"<h1><big>D</big>ataset Generator <small>PLUS</small></h1><h2>for English, German, and French</h2>\")\n",
208
+
" subtitle = gr.HTML(\"<h3>Instructions:</h3><ol><li>Pick the language</li>\\\n",
209
+
"<li>Select a model</li><li>Indicate how many sentences you need</li>\\\n",
210
+
"<li>Describe the type of sentence you're looking for</li><li>Give up to three examples of the desired output sentence, and describe each of them briefly</li>\\\n",
211
+
"<li>Hit <q>Create Dataset</q></li>\\\n",
212
+
"<li>Save the output (.txt) to your Google Drive</li>\")\n",
" outputPath = gr.Textbox(label=\"Specify the desired name and location on your Google Drive for the sentences (plain text) to be saved\", interactive=True)\n",
241
+
" with gr.Row():\n",
242
+
" save = gr.Button(value=\"Save generated data\", elem_classes=\"blue-button\")\n",
" amount = int(volume) if re.search(\"^[0-9]+$\", volume) is not None else 10\n",
249
+
"\n",
250
+
" if typeInput != None:\n",
251
+
" nature = typeInput\n",
252
+
" else:\n",
253
+
" nature = \"Random sentences of mixed nature\"\n",
254
+
"\n",
255
+
" if s1 != None:\n",
256
+
" if i1 != None:\n",
257
+
" shots[i1] = s1\n",
258
+
" else:\n",
259
+
" shots[\"A medium-long random sentence about anything\"] = s1\n",
260
+
" else:\n",
261
+
" shots[\"A medium-long random sentence about anything\"] = \"Paul, waking up out of his half-drunken haze, clearly couldn't tell left from right and ran right into the door.\"\n",
262
+
"\n",
263
+
" if s2 != None:\n",
264
+
" if i2 != None:\n",
265
+
" shots[i2] = s2\n",
266
+
" else:\n",
267
+
" shots[\"A medium-long random sentence about anything\"] = s2\n",
268
+
"\n",
269
+
" if s3 != None:\n",
270
+
" if i3 != None:\n",
271
+
" shots[i3] = s3\n",
272
+
" else:\n",
273
+
" shots[\"A medium-long random sentence about anything\"] = s3\n",
" save.click(saveData, inputs=outputPath, outputs=None).then(lambda: gr.update(value=\"Your data has been saved\", elem_classes=\"green-button\"), [], [save])\n",
0 commit comments