Resolution hinzugefügt
Und zurückgeschraubt auf 3.5
This commit is contained in:
@ -32,6 +32,15 @@
|
||||
</RadzenSlider>
|
||||
<RadzenText>@temperature</RadzenText>
|
||||
</RadzenStack>
|
||||
<RadzenStack Orientation="Orientation.Horizontal"
|
||||
AlignItems="AlignItems.Center" Wrap="FlexWrap.Wrap">
|
||||
<RadzenText>Resolution:</RadzenText>
|
||||
<RadzenStack Orientation="Orientation.Horizontal">
|
||||
<RadzenNumeric ShowUpDown = "false" TValue = "int?" @bind-Value=@width />
|
||||
x
|
||||
<RadzenNumeric ShowUpDown = "false" TValue = "int?" @bind-Value=@height />
|
||||
</RadzenStack>
|
||||
</RadzenStack>
|
||||
</RadzenCard>
|
||||
</ChildContent>
|
||||
</RadzenPanel>
|
||||
@ -179,6 +188,8 @@
|
||||
private string _imagePrompt = "";
|
||||
|
||||
private float temperature = 0.9f;
|
||||
private int? width = 1024;
|
||||
private int? height = 1024;
|
||||
private string request = "";
|
||||
private string addons = "";
|
||||
private OpenAIAPI _openAiApi;
|
||||
@ -241,7 +252,7 @@
|
||||
_openAiApi = new OpenAIAPI(_openAiApiKey);
|
||||
|
||||
var inferenceModelUrl = "https://api-inference.huggingface.co/models/Nacken/kkkk-sdxl-5000";
|
||||
|
||||
|
||||
//_client.BaseAddress = new Uri(inferenceModelUrl);
|
||||
|
||||
_client.DefaultRequestHeaders.Clear();
|
||||
@ -319,6 +330,12 @@
|
||||
var postData = new
|
||||
{
|
||||
inputs = prompt,
|
||||
parameters = new
|
||||
{
|
||||
negative_prompt = "photorealistic, highly detailed, 8K, portrait",
|
||||
width = width,
|
||||
height = height
|
||||
},
|
||||
options = new
|
||||
{
|
||||
// Cache deaktivieren, damit Huggingface für den selben Prompt unterschiedliche Ergebnisse liefert
|
||||
@ -412,7 +429,7 @@
|
||||
ChatRequest chatRequest = new ChatRequest
|
||||
{
|
||||
Temperature = temperature,
|
||||
Model = Model.GPT4,
|
||||
Model = Model.ChatGPTTurbo,
|
||||
};
|
||||
|
||||
converse = _openAiApi.Chat.CreateConversation(chatRequest);
|
||||
|
||||
Reference in New Issue
Block a user