PB Unity
commited on
Commit
•
3a3ea73
1
Parent(s):
8280066
Upload RunPhi15.cs
Browse files- RunPhi15.cs +6 -0
RunPhi15.cs
CHANGED
@@ -30,6 +30,7 @@ public class RunPhi15 : MonoBehaviour
|
|
30 |
//string outputString = "Question: \"What is the capital of France?\"\n Correct answer: \"";
|
31 |
//string outputString = "The human asked, \"What is your favourite animal?\" so the wise man answered correctly, \"";
|
32 |
string outputString = "Once upon a time, there were three";
|
|
|
33 |
|
34 |
// This is how many tokens you want. It can be adjusted.
|
35 |
const int maxTokens = 100;
|
@@ -125,6 +126,11 @@ public class RunPhi15 : MonoBehaviour
|
|
125 |
{
|
126 |
runInference = false;
|
127 |
}
|
|
|
|
|
|
|
|
|
|
|
128 |
else outputString += GetUnicodeText(tokens[ID]);
|
129 |
|
130 |
Debug.Log(outputString);
|
|
|
30 |
//string outputString = "Question: \"What is the capital of France?\"\n Correct answer: \"";
|
31 |
//string outputString = "The human asked, \"What is your favourite animal?\" so the wise man answered correctly, \"";
|
32 |
string outputString = "Once upon a time, there were three";
|
33 |
+
//string outputString = "// Javascript function for prime numbers";
|
34 |
|
35 |
// This is how many tokens you want. It can be adjusted.
|
36 |
const int maxTokens = 100;
|
|
|
126 |
{
|
127 |
runInference = false;
|
128 |
}
|
129 |
+
else if (ID < 0 || ID >= tokens.Length)
|
130 |
+
{
|
131 |
+
// Really we should use the added_tokens.json for this
|
132 |
+
outputString += " ";
|
133 |
+
}
|
134 |
else outputString += GetUnicodeText(tokens[ID]);
|
135 |
|
136 |
Debug.Log(outputString);
|