From cd9c2734f08f45d19e92f39c5c2c0b1344652b58 Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Fri, 8 Nov 2024 09:23:36 +0300 Subject: Add Yandex Vision OCR client --- VisionClient/Models/VisionResponse.cs | 5 +++++ VisionClient/Services/IYandexVisionClient.cs | 24 ++++++++++++++++++++++++ VisionClient/VisionClient.csproj | 14 ++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 VisionClient/Models/VisionResponse.cs create mode 100644 VisionClient/Services/IYandexVisionClient.cs create mode 100644 VisionClient/VisionClient.csproj (limited to 'VisionClient') diff --git a/VisionClient/Models/VisionResponse.cs b/VisionClient/Models/VisionResponse.cs new file mode 100644 index 0000000..23a32fd --- /dev/null +++ b/VisionClient/Models/VisionResponse.cs @@ -0,0 +1,5 @@ +namespace VisionClient.Models; + +public class VisionResponse +{ +} \ No newline at end of file diff --git a/VisionClient/Services/IYandexVisionClient.cs b/VisionClient/Services/IYandexVisionClient.cs new file mode 100644 index 0000000..77105be --- /dev/null +++ b/VisionClient/Services/IYandexVisionClient.cs @@ -0,0 +1,24 @@ +using VisionClient.Models; +using System.Net.Http; + +namespace VisionClient.Services; + +public interface IYandexVisionClient +{ + public Task ProcessImage(string base64Image); +} + +public class YandexVisionClient : IYandexVisionClient +{ + private readonly HttpClient _httpClient; + + public YandexVisionClient(HttpClient httpClient) + { + _httpClient = httpClient; + } + + public Task ProcessImage(string base64Image) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/VisionClient/VisionClient.csproj b/VisionClient/VisionClient.csproj new file mode 100644 index 0000000..4f78021 --- /dev/null +++ b/VisionClient/VisionClient.csproj @@ -0,0 +1,14 @@ + + + + net472;net6.0-windows + 10 + enable + enable + + + + + + + -- cgit v1.2.3