Spaces:
Runtime error
Runtime error
Upload Gradio_Related.py
Browse files
App_Function_Libraries/Gradio_Related.py
CHANGED
|
@@ -68,6 +68,8 @@ from App_Function_Libraries.Video_DL_Ingestion_Lib import parse_and_expand_urls,
|
|
| 68 |
# Function Definitions
|
| 69 |
#
|
| 70 |
|
|
|
|
|
|
|
| 71 |
whisper_models = ["small", "medium", "small.en", "medium.en", "medium", "large", "large-v1", "large-v2", "large-v3",
|
| 72 |
"distil-large-v2", "distil-medium.en", "distil-small.en"]
|
| 73 |
custom_prompt_input = None
|
|
@@ -669,8 +671,12 @@ def create_video_transcription_tab():
|
|
| 669 |
api_name_input = gr.Dropdown(
|
| 670 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 671 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 672 |
-
value=
|
| 673 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 674 |
keywords_input = gr.Textbox(label="Keywords", placeholder="Enter keywords here (comma-separated)",
|
| 675 |
value="default,no_keyword_set")
|
| 676 |
batch_size_input = gr.Slider(minimum=1, maximum=10, value=1, step=1,
|
|
@@ -1316,10 +1322,12 @@ def create_audio_processing_tab():
|
|
| 1316 |
api_name_input = gr.Dropdown(
|
| 1317 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 1318 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 1319 |
-
value=
|
| 1320 |
label="API for Summarization (Optional)"
|
| 1321 |
)
|
| 1322 |
-
api_key_input = gr.Textbox(label="API Key (if required)", placeholder="Enter your API key here",
|
|
|
|
|
|
|
| 1323 |
custom_keywords_input = gr.Textbox(label="Custom Keywords", placeholder="Enter custom keywords, comma-separated")
|
| 1324 |
keep_original_input = gr.Checkbox(label="Keep original audio file", value=False)
|
| 1325 |
|
|
@@ -1424,10 +1432,13 @@ def create_podcast_tab():
|
|
| 1424 |
podcast_api_name_input = gr.Dropdown(
|
| 1425 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter", "Llama.cpp",
|
| 1426 |
"Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 1427 |
-
value=
|
| 1428 |
-
label="API Name for Summarization (Optional)"
|
|
|
|
| 1429 |
)
|
| 1430 |
-
podcast_api_key_input = gr.Textbox(label="API Key (if required)",
|
|
|
|
|
|
|
| 1431 |
podcast_whisper_model_input = gr.Dropdown(choices=whisper_models, value="medium", label="Whisper Model")
|
| 1432 |
|
| 1433 |
keep_original_input = gr.Checkbox(label="Keep original audio file", value=False)
|
|
@@ -1545,9 +1556,15 @@ def create_website_scraping_tab():
|
|
| 1545 |
|
| 1546 |
api_name_input = gr.Dropdown(
|
| 1547 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 1548 |
-
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1549 |
api_key_input = gr.Textbox(label="API Key (Mandatory if API Name is specified)",
|
| 1550 |
-
placeholder="Enter your API key here; Ignore if using Local API or Built-in API",
|
|
|
|
|
|
|
| 1551 |
keywords_input = gr.Textbox(label="Keywords", placeholder="Enter keywords here (comma-separated)",
|
| 1552 |
value="default,no_keyword_set", visible=True)
|
| 1553 |
|
|
@@ -1655,8 +1672,14 @@ def create_resummary_tab():
|
|
| 1655 |
api_name_input = gr.Dropdown(
|
| 1656 |
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 1657 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 1658 |
-
value="
|
| 1659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1660 |
|
| 1661 |
chunking_options_checkbox = gr.Checkbox(label="Use Chunking", value=False)
|
| 1662 |
with gr.Row(visible=False) as chunking_options_box:
|
|
@@ -2853,9 +2876,13 @@ def create_chat_interface():
|
|
| 2853 |
with gr.Row():
|
| 2854 |
load_conversations_btn = gr.Button("Load Selected Conversation")
|
| 2855 |
|
| 2856 |
-
api_endpoint = gr.Dropdown(label="Select API Endpoint",
|
| 2857 |
-
|
| 2858 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2859 |
custom_prompt_checkbox = gr.Checkbox(label="Use a Custom Prompt",
|
| 2860 |
value=False,
|
| 2861 |
visible=True)
|
|
@@ -3062,8 +3089,11 @@ def create_chat_interface_editable():
|
|
| 3062 |
|
| 3063 |
api_endpoint = gr.Dropdown(label="Select API Endpoint",
|
| 3064 |
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 3065 |
-
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"]
|
| 3066 |
-
|
|
|
|
|
|
|
|
|
|
| 3067 |
# preset_prompt_checkbox = gr.Checkbox(label="Use a pre-set Prompt",
|
| 3068 |
# value=False,
|
| 3069 |
# visible=True)
|
|
@@ -3261,8 +3291,12 @@ def create_chat_interface_stacked():
|
|
| 3261 |
search_conversations_btn = gr.Button("Search Conversations")
|
| 3262 |
load_conversations_btn = gr.Button("Load Selected Conversation")
|
| 3263 |
with gr.Column():
|
| 3264 |
-
api_endpoint = gr.Dropdown(label="Select API Endpoint",
|
| 3265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3266 |
preset_prompt = gr.Dropdown(label="Select Preset Prompt",
|
| 3267 |
choices=load_preset_prompts(),
|
| 3268 |
visible=True)
|
|
@@ -3432,8 +3466,11 @@ def create_chat_interface_multi_api():
|
|
| 3432 |
api_endpoint = gr.Dropdown(label=f"API Endpoint {i + 1}",
|
| 3433 |
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq",
|
| 3434 |
"DeepSeek", "Mistral", "OpenRouter", "Llama.cpp", "Kobold", "Ooba",
|
| 3435 |
-
"Tabbyapi", "VLLM", "HuggingFace"]
|
| 3436 |
-
|
|
|
|
|
|
|
|
|
|
| 3437 |
temperature = gr.Slider(label=f"Temperature {i + 1}", minimum=0.0, maximum=1.0, step=0.1, value=0.7)
|
| 3438 |
chatbot = gr.Chatbot(height=800, elem_classes="chat-window")
|
| 3439 |
chatbots.append(chatbot)
|
|
@@ -3543,8 +3580,9 @@ def create_chat_interface_four():
|
|
| 3543 |
api_endpoint = gr.Dropdown(label=f"API Endpoint {i + 1}",
|
| 3544 |
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq",
|
| 3545 |
"DeepSeek", "Mistral", "OpenRouter", "Llama.cpp", "Kobold", "Ooba",
|
| 3546 |
-
"Tabbyapi", "VLLM", "HuggingFace"]
|
| 3547 |
-
|
|
|
|
| 3548 |
temperature = gr.Slider(label=f"Temperature {i + 1}", minimum=0.0, maximum=1.0, step=0.1, value=0.7)
|
| 3549 |
chatbot = gr.Chatbot(height=400, elem_classes="chat-window")
|
| 3550 |
msg = gr.Textbox(label=f"Enter your message for Chat {i + 1}")
|
|
@@ -3629,9 +3667,13 @@ def create_chat_interface_vertical():
|
|
| 3629 |
use_prompt = gr.Checkbox(label="Use Prompt")
|
| 3630 |
save_conversation = gr.Checkbox(label="Save Conversation", value=False)
|
| 3631 |
with gr.Row():
|
| 3632 |
-
api_endpoint = gr.Dropdown(label="Select API Endpoint",
|
|
|
|
|
|
|
| 3633 |
with gr.Row():
|
| 3634 |
-
api_key = gr.Textbox(label="API Key (if required)",
|
|
|
|
|
|
|
| 3635 |
with gr.Row():
|
| 3636 |
temperature = gr.Slider(label="Temperature", minimum=0.0, maximum=1.0, step=0.1, value=0.7)
|
| 3637 |
with gr.Row():
|
|
@@ -4325,9 +4367,12 @@ def create_import_item_tab():
|
|
| 4325 |
api_name_input = gr.Dropdown(
|
| 4326 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 4327 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 4328 |
-
label="API for Auto-summarization"
|
|
|
|
| 4329 |
)
|
| 4330 |
-
api_key_input = gr.Textbox(label="API Key",
|
|
|
|
|
|
|
| 4331 |
with gr.Row():
|
| 4332 |
import_button = gr.Button("Import Data")
|
| 4333 |
with gr.Row():
|
|
@@ -4659,9 +4704,12 @@ def create_import_book_tab():
|
|
| 4659 |
api_name_input = gr.Dropdown(
|
| 4660 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 4661 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 4662 |
-
label="API for Auto-summarization"
|
|
|
|
| 4663 |
)
|
| 4664 |
-
api_key_input = gr.Textbox(label="API Key",
|
|
|
|
|
|
|
| 4665 |
import_button = gr.Button("Import eBook")
|
| 4666 |
with gr.Column():
|
| 4667 |
with gr.Row():
|
|
@@ -5093,11 +5141,12 @@ def create_document_editing_tab():
|
|
| 5093 |
api_name_input = gr.Dropdown(
|
| 5094 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 5095 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 5096 |
-
value=
|
| 5097 |
label="API for Grammar Check"
|
| 5098 |
)
|
| 5099 |
api_key_input = gr.Textbox(label="API Key (if not set in config.txt)", placeholder="Enter your API key here",
|
| 5100 |
-
type="password"
|
|
|
|
| 5101 |
check_grammar_button = gr.Button("Check Grammar and Style")
|
| 5102 |
|
| 5103 |
with gr.Column():
|
|
@@ -5122,11 +5171,12 @@ def create_document_editing_tab():
|
|
| 5122 |
api_name_input = gr.Dropdown(
|
| 5123 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 5124 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 5125 |
-
value=
|
| 5126 |
label="API for Grammar Check"
|
| 5127 |
)
|
| 5128 |
api_key_input = gr.Textbox(label="API Key (if not set in config.txt)", placeholder="Enter your API key here",
|
| 5129 |
-
type="password"
|
|
|
|
| 5130 |
adjust_btn = gr.Button("Adjust Tone")
|
| 5131 |
|
| 5132 |
with gr.Column():
|
|
|
|
| 68 |
# Function Definitions
|
| 69 |
#
|
| 70 |
|
| 71 |
+
# I know this is bad, I don't care, this key is set to expire on Aug 19. Until then, it is what it is.
|
| 72 |
+
MISTRAL_TOKEN = os.environ["p3hw1VRckQl86OjeOtvaOckMfAaernxz"]
|
| 73 |
whisper_models = ["small", "medium", "small.en", "medium.en", "medium", "large", "large-v1", "large-v2", "large-v3",
|
| 74 |
"distil-large-v2", "distil-medium.en", "distil-small.en"]
|
| 75 |
custom_prompt_input = None
|
|
|
|
| 671 |
api_name_input = gr.Dropdown(
|
| 672 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 673 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 674 |
+
value="Mistral",
|
| 675 |
+
label="API Name (Mandatory)",
|
| 676 |
+
placeholder="Mistral")
|
| 677 |
+
api_key_input = gr.Textbox(label="API Key (Mandatory)", placeholder="Enter your API key here",
|
| 678 |
+
type="password",
|
| 679 |
+
value=MISTRAL_TOKEN)
|
| 680 |
keywords_input = gr.Textbox(label="Keywords", placeholder="Enter keywords here (comma-separated)",
|
| 681 |
value="default,no_keyword_set")
|
| 682 |
batch_size_input = gr.Slider(minimum=1, maximum=10, value=1, step=1,
|
|
|
|
| 1322 |
api_name_input = gr.Dropdown(
|
| 1323 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 1324 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 1325 |
+
value="Mistral",
|
| 1326 |
label="API for Summarization (Optional)"
|
| 1327 |
)
|
| 1328 |
+
api_key_input = gr.Textbox(label="API Key (if required)", placeholder="Enter your API key here",
|
| 1329 |
+
type="password",
|
| 1330 |
+
value=MISTRAL_TOKEN)
|
| 1331 |
custom_keywords_input = gr.Textbox(label="Custom Keywords", placeholder="Enter custom keywords, comma-separated")
|
| 1332 |
keep_original_input = gr.Checkbox(label="Keep original audio file", value=False)
|
| 1333 |
|
|
|
|
| 1432 |
podcast_api_name_input = gr.Dropdown(
|
| 1433 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter", "Llama.cpp",
|
| 1434 |
"Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 1435 |
+
value="Mistral",
|
| 1436 |
+
label="API Name for Summarization (Optional)",
|
| 1437 |
+
placeholder="Mistral"
|
| 1438 |
)
|
| 1439 |
+
podcast_api_key_input = gr.Textbox(label="API Key (if required)",
|
| 1440 |
+
type="password",
|
| 1441 |
+
value=MISTRAL_TOKEN)
|
| 1442 |
podcast_whisper_model_input = gr.Dropdown(choices=whisper_models, value="medium", label="Whisper Model")
|
| 1443 |
|
| 1444 |
keep_original_input = gr.Checkbox(label="Keep original audio file", value=False)
|
|
|
|
| 1556 |
|
| 1557 |
api_name_input = gr.Dropdown(
|
| 1558 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 1559 |
+
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 1560 |
+
value="Mistral",
|
| 1561 |
+
label="API Name (Mandatory for Summarization)",
|
| 1562 |
+
placeholder="Mistral"
|
| 1563 |
+
)
|
| 1564 |
api_key_input = gr.Textbox(label="API Key (Mandatory if API Name is specified)",
|
| 1565 |
+
placeholder="Enter your API key here; Ignore if using Local API or Built-in API",
|
| 1566 |
+
type="password",
|
| 1567 |
+
value=MISTRAL_TOKEN)
|
| 1568 |
keywords_input = gr.Textbox(label="Keywords", placeholder="Enter keywords here (comma-separated)",
|
| 1569 |
value="default,no_keyword_set", visible=True)
|
| 1570 |
|
|
|
|
| 1672 |
api_name_input = gr.Dropdown(
|
| 1673 |
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 1674 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 1675 |
+
value="Mistral",
|
| 1676 |
+
label="API Name",
|
| 1677 |
+
placeholder="Mistral"
|
| 1678 |
+
)
|
| 1679 |
+
api_key_input = gr.Textbox(label="API Key",
|
| 1680 |
+
placeholder="Enter your API key here",
|
| 1681 |
+
type="password",
|
| 1682 |
+
value=MISTRAL_TOKEN)
|
| 1683 |
|
| 1684 |
chunking_options_checkbox = gr.Checkbox(label="Use Chunking", value=False)
|
| 1685 |
with gr.Row(visible=False) as chunking_options_box:
|
|
|
|
| 2876 |
with gr.Row():
|
| 2877 |
load_conversations_btn = gr.Button("Load Selected Conversation")
|
| 2878 |
|
| 2879 |
+
api_endpoint = gr.Dropdown(label="Select API Endpoint",
|
| 2880 |
+
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 2881 |
+
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 2882 |
+
value="Mistral")
|
| 2883 |
+
api_key = gr.Textbox(label="API Key (if required)",
|
| 2884 |
+
type="password",
|
| 2885 |
+
value=MISTRAL_TOKEN)
|
| 2886 |
custom_prompt_checkbox = gr.Checkbox(label="Use a Custom Prompt",
|
| 2887 |
value=False,
|
| 2888 |
visible=True)
|
|
|
|
| 3089 |
|
| 3090 |
api_endpoint = gr.Dropdown(label="Select API Endpoint",
|
| 3091 |
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 3092 |
+
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 3093 |
+
value="Mistral")
|
| 3094 |
+
api_key = gr.Textbox(label="API Key (if required)",
|
| 3095 |
+
type="password",
|
| 3096 |
+
value=MISTRAL_TOKEN)
|
| 3097 |
# preset_prompt_checkbox = gr.Checkbox(label="Use a pre-set Prompt",
|
| 3098 |
# value=False,
|
| 3099 |
# visible=True)
|
|
|
|
| 3291 |
search_conversations_btn = gr.Button("Search Conversations")
|
| 3292 |
load_conversations_btn = gr.Button("Load Selected Conversation")
|
| 3293 |
with gr.Column():
|
| 3294 |
+
api_endpoint = gr.Dropdown(label="Select API Endpoint",
|
| 3295 |
+
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "OpenRouter", "Mistral", "Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 3296 |
+
value="Mistral")
|
| 3297 |
+
api_key = gr.Textbox(label="API Key (if required)",
|
| 3298 |
+
type="password",
|
| 3299 |
+
value=MISTRAL_TOKEN)
|
| 3300 |
preset_prompt = gr.Dropdown(label="Select Preset Prompt",
|
| 3301 |
choices=load_preset_prompts(),
|
| 3302 |
visible=True)
|
|
|
|
| 3466 |
api_endpoint = gr.Dropdown(label=f"API Endpoint {i + 1}",
|
| 3467 |
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq",
|
| 3468 |
"DeepSeek", "Mistral", "OpenRouter", "Llama.cpp", "Kobold", "Ooba",
|
| 3469 |
+
"Tabbyapi", "VLLM", "HuggingFace"],
|
| 3470 |
+
value="Mistral")
|
| 3471 |
+
api_key = gr.Textbox(label=f"API Key {i + 1} (if required)",
|
| 3472 |
+
type="password",
|
| 3473 |
+
value=MISTRAL_TOKEN)
|
| 3474 |
temperature = gr.Slider(label=f"Temperature {i + 1}", minimum=0.0, maximum=1.0, step=0.1, value=0.7)
|
| 3475 |
chatbot = gr.Chatbot(height=800, elem_classes="chat-window")
|
| 3476 |
chatbots.append(chatbot)
|
|
|
|
| 3580 |
api_endpoint = gr.Dropdown(label=f"API Endpoint {i + 1}",
|
| 3581 |
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq",
|
| 3582 |
"DeepSeek", "Mistral", "OpenRouter", "Llama.cpp", "Kobold", "Ooba",
|
| 3583 |
+
"Tabbyapi", "VLLM", "HuggingFace"],
|
| 3584 |
+
value="Mistral")
|
| 3585 |
+
api_key = gr.Textbox(label=f"API Key {i + 1} (if required)", type="password", value=MISTRAL_TOKEN)
|
| 3586 |
temperature = gr.Slider(label=f"Temperature {i + 1}", minimum=0.0, maximum=1.0, step=0.1, value=0.7)
|
| 3587 |
chatbot = gr.Chatbot(height=400, elem_classes="chat-window")
|
| 3588 |
msg = gr.Textbox(label=f"Enter your message for Chat {i + 1}")
|
|
|
|
| 3667 |
use_prompt = gr.Checkbox(label="Use Prompt")
|
| 3668 |
save_conversation = gr.Checkbox(label="Save Conversation", value=False)
|
| 3669 |
with gr.Row():
|
| 3670 |
+
api_endpoint = gr.Dropdown(label="Select API Endpoint",
|
| 3671 |
+
choices=["Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter", "Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 3672 |
+
value="Mistral")
|
| 3673 |
with gr.Row():
|
| 3674 |
+
api_key = gr.Textbox(label="API Key (if required)",
|
| 3675 |
+
type="password",
|
| 3676 |
+
value=MISTRAL_TOKEN)
|
| 3677 |
with gr.Row():
|
| 3678 |
temperature = gr.Slider(label="Temperature", minimum=0.0, maximum=1.0, step=0.1, value=0.7)
|
| 3679 |
with gr.Row():
|
|
|
|
| 4367 |
api_name_input = gr.Dropdown(
|
| 4368 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 4369 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 4370 |
+
label="API for Auto-summarization",
|
| 4371 |
+
value="Mistral"
|
| 4372 |
)
|
| 4373 |
+
api_key_input = gr.Textbox(label="API Key",
|
| 4374 |
+
type="password",
|
| 4375 |
+
value=MISTRAL_TOKEN)
|
| 4376 |
with gr.Row():
|
| 4377 |
import_button = gr.Button("Import Data")
|
| 4378 |
with gr.Row():
|
|
|
|
| 4704 |
api_name_input = gr.Dropdown(
|
| 4705 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 4706 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 4707 |
+
label="API for Auto-summarization",
|
| 4708 |
+
value="Mistral"
|
| 4709 |
)
|
| 4710 |
+
api_key_input = gr.Textbox(label="API Key",
|
| 4711 |
+
type="password",
|
| 4712 |
+
value=MISTRAL_TOKEN)
|
| 4713 |
import_button = gr.Button("Import eBook")
|
| 4714 |
with gr.Column():
|
| 4715 |
with gr.Row():
|
|
|
|
| 5141 |
api_name_input = gr.Dropdown(
|
| 5142 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 5143 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 5144 |
+
value="Mistral",
|
| 5145 |
label="API for Grammar Check"
|
| 5146 |
)
|
| 5147 |
api_key_input = gr.Textbox(label="API Key (if not set in config.txt)", placeholder="Enter your API key here",
|
| 5148 |
+
type="password",
|
| 5149 |
+
value=MISTRAL_TOKEN)
|
| 5150 |
check_grammar_button = gr.Button("Check Grammar and Style")
|
| 5151 |
|
| 5152 |
with gr.Column():
|
|
|
|
| 5171 |
api_name_input = gr.Dropdown(
|
| 5172 |
choices=[None, "Local-LLM", "OpenAI", "Anthropic", "Cohere", "Groq", "DeepSeek", "Mistral", "OpenRouter",
|
| 5173 |
"Llama.cpp", "Kobold", "Ooba", "Tabbyapi", "VLLM", "HuggingFace"],
|
| 5174 |
+
value="Mistral",
|
| 5175 |
label="API for Grammar Check"
|
| 5176 |
)
|
| 5177 |
api_key_input = gr.Textbox(label="API Key (if not set in config.txt)", placeholder="Enter your API key here",
|
| 5178 |
+
type="password",
|
| 5179 |
+
value=MISTRAL_TOKEN)
|
| 5180 |
adjust_btn = gr.Button("Adjust Tone")
|
| 5181 |
|
| 5182 |
with gr.Column():
|