This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dev.langchain4j.agent.tool.Tool; | |
| import dev.langchain4j.http.client.jdk.JdkHttpClient; | |
| import dev.langchain4j.memory.chat.MessageWindowChatMemory; | |
| import dev.langchain4j.model.openai.OpenAiStreamingChatModel; | |
| import dev.langchain4j.service.AiServices; | |
| import dev.langchain4j.service.TokenStream; | |
| import module java.desktop; | |
| import java.net.http.HttpClient; | |
| import java.time.LocalTime; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gradio as gr | |
| from PIL import Image | |
| import threading | |
| import requests | |
| from transformers import AutoModelForCausalLM, AutoProcessor, set_seed, TextIteratorStreamer, BitsAndBytesConfig | |
| # Define model path | |
| model_path = "sbintuitions/sarashina2.2-vision-3b" | |
| # Load model and processor |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import module java.desktop; | |
| import java.util.List; | |
| Random rnd = new Random(); | |
| // ひらがな:U+3041 .. U+3096(ぁ〜ゖ) | |
| int HIRAGANA_START = 0x3041; | |
| int HIRAGANA_END = 0x3096; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package naoki.vcc; | |
| import java.io.*; | |
| import java.net.URI; | |
| import java.net.URLEncoder; | |
| import java.net.http.*; | |
| import java.net.http.WebSocket; | |
| import java.nio.charset.StandardCharsets; | |
| import java.nio.file.Files; | |
| import java.util.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dev.langchain4j.data.message.SystemMessage; | |
| import dev.langchain4j.data.message.UserMessage; | |
| import dev.langchain4j.http.client.jdk.JdkHttpClient; | |
| import dev.langchain4j.model.chat.response.ChatResponse; | |
| import dev.langchain4j.model.chat.response.StreamingChatResponseHandler; | |
| import dev.langchain4j.model.openai.OpenAiStreamingChatModel; | |
| import module java.desktop; | |
| import java.net.http.HttpClient; | |
| import java.util.ArrayList; |
NewerOlder