Fatal error: Uncaught Exception: 401:
Vikasitha444 opened this issue · comments
Notice: Trying to get property 'detail' of non-object in C:\xampp\htdocs\PHP Tutorials\NLU model\vendor\nlpcloud\nlpcloud-client\src\NLPCloud.php on line 169
Fatal error: Uncaught Exception: 401: in C:\xampp\htdocs\PHP Tutorials\NLU model\vendor\nlpcloud\nlpcloud-client\src\NLPCloud.php:169 Stack trace: #0 C:\xampp\htdocs\PHP Tutorials\NLU model\grammar.php(8): NLPCloud\NLPCloud->summarization('One month after...') #1 {main} thrown in C:\xampp\htdocs\PHP Tutorials\NLU model\vendor\nlpcloud\nlpcloud-client\src\NLPCloud.php on line 169
Hello @Vikasitha444 it seems that there is an authentication issue with your request.
Did you properly retrieve your API token on NLP Cloud?
Maybe you can share your piece of code here?
Fatal error: Uncaught Error: Call to undefined function gsCorrection() in C:\xampp\htdocs\PHP Tutorials\tg-bot\NLP Model\grammar.php:22 Stack trace: #0 {main} thrown in C:\xampp\htdocs\PHP Tutorials\tg-bot\NLP Model\grammar.php on line 22
<?php
require 'vendor/autoload.php';
use NLPCloud\NLPCloud;
$client = new \NLPCloud\NLPCloud('bart-large-cnn','<my_key>');
$client.gsCorrection("<Your block of text>");
Thanks.
Grammar correction is not compatible with Bart Large CNN.
You should either use GPT-J, Fast GPT-J, or Finetuned GPT-NeoX 20B.
Here's an example using GPT-J (you need to select the pay-as-you-go plan for your tests):
<?php
require 'vendor/autoload.php';
use NLPCloud\NLPCloud;
$client = new \NLPCloud\NLPCloud('gpt-j','<my_key>',True);
$client.gsCorrection("<Your block of text>");
Closing as inactive.