Datasets:
Download intext.py from pythondikry/dictionary: direct link, hf CLI and curl.
- Browser
- Download file 908 Bytes
-
https://huggingface.co/datasets/pythondikry/dictionary/resolve/main/intext.py
- Command line
-
hf download hf://datasets/pythondikry/dictionary/intext.py
-
curl -L -o intext.py https://huggingface.co/datasets/pythondikry/dictionary/resolve/main/intext.py
908 Bytes
| input = input("Введите описание или название товара") | |
| print(input) | |
| prediction = input | |
| print(prediction) | |
| #-*- coding: utf-8 -*- | |
| from gigachat import GigaChat | |
| import telebot | |
| TOKEN = "Ваш токен" | |
| bot = telebot.TeleBot(TOKEN) | |
| def start_text(message): | |
| print(message) | |
| #bot.send_message(message.chat.id,message.text) | |
| #bot.send_message(message.chat.id, message) | |
| # Укажите ключ авторизации, полученный в личном кабинете, в интерфейсе проекта GigaChat API | |
| with GigaChat(credentials="Ключик со Сбера", verify_ssl_certs=False) as giga: | |
| response = giga.chat(message.text) | |
| print(response.choices[0].message.content) | |
| bot.send_message(message.chat.id, response.choices[0].message.content) | |
| bot.infinity_polling() |