Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
sergix44 authored and github-actions[bot] committed Mar 23, 2024
1 parent 8262fd3 commit 64017a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ private function sseLoop(Endpoint $endpoint, array $payload, string $protocol, ?
'session_hash' => $this->sessionHash,
]);


if ($response->getStatusCode() === 503) {
throw new QueueFullException();
}
Expand All @@ -224,7 +223,7 @@ private function sseLoop(Endpoint $endpoint, array $payload, string $protocol, ?

$buffer = '';
$message = null;
while (!$response->getBody()->eof()) {
while (! $response->getBody()->eof()) {
$data = $response->getBody()->read(1);
if ($data !== "\n") {
$buffer .= $data;
Expand Down Expand Up @@ -252,6 +251,7 @@ private function sseLoop(Endpoint $endpoint, array $payload, string $protocol, ?
throw new GradioException('Error sending data');
}
$buffer = '';

continue;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$client->predict([], fnIndex: 5, raw: true);
$client->predict(['hi'], fnIndex: 1, raw: true);
$client->predict([null, []], fnIndex: 2, raw: true);
$response = $client->predict([null, null, "", 0.9, 256, 0.9, 1.2], fnIndex: 3);
$response = $client->predict([null, null, '', 0.9, 256, 0.9, 1.2], fnIndex: 3);
$client->predict([], fnIndex: 6, raw: true);

$outputs = $response->getOutputs();
Expand All @@ -39,7 +39,7 @@

it('can test fnindexsudgugdhs', function () {
$client = new Client('https://deepseek-ai-deepseek-vl-7b.hf.space');
$response = $client->predict([[["Hello!", null]], 0, 0, 0, 0, 0, 'DeepSeek-VL 7B'], apiName: '/predict');
$response = $client->predict([[['Hello!', null]], 0, 0, 0, 0, 0, 'DeepSeek-VL 7B'], apiName: '/predict');

$value = $response->getOutput();

Expand Down

0 comments on commit 64017a0

Please # to comment.