Vasyanator / google_translate_plus

google_translate extension improved by me and chatgpt for oobabooga/text-generation-webui
2 stars 3 forks source link

load failue #1

Open flotufox opened 9 months ago

flotufox commented 9 months ago

using camenduru/text-generation-webui-colab i used following code to download the extension: !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://github.com/Vasyanator/google_translate_plus/blob/main/requirements.txt -d /content/text-generation-webui/extensions/google_translate_plus -o requirements.txt !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://github.com/Vasyanator/google_translate_plus/blob/main/script.py -d /content/text-generation-webui/extensions/google_translate_plus -o script.py !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://github.com/Vasyanator/google_translate_plus/blob/main/settings.json -d /content/text-generation-webui/extensions/google_translate_plus -o settings.json

i used following code to load the extension: --extensions google_translate_plus

when i try to run the model, at the stage : 2023-10-15 14:59:48 INFO:Loading the extension "google_translate_plus"... 2023-10-15 14:59:48 ERROR:Failed to load the extension "google_translate_plus".

Traceback (most recent call last): File "/content/text-generation-webui/modules/extensions.py", line 35, in load_extensions exec(f"import extensions.{name}.script") File "", line 1, in File "/content/text-generation-webui/extensions/google_translate_plus/script.py", line 1, in {"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"README.md","path":"README.md","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"},{"name":"script.py","path":"script.py","contentType":"file"},{"name":"settings.json","path":"settings.json","contentType":"file"}],"totalCount":4}},"fileTreeProcessingTime":1.890233,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":........ NameError: name 'false' is not defined

Vasyanator commented 9 months ago

Sorry, I can't test this extension in google colab. Can you try running it again and give more detailed information about the error?

flotufox commented 9 months ago

i tried to run the code in google colab: ################ !echo "dark_theme: true" > /content/settings.yaml !echo "chat_style: wpp" >> /content/settings.yaml !echo "mode: 'instruct'" >> /content/settings.yaml !echo "instruction_template: 'Wizard-Mega WizardLM'" >> /content/settings.yaml

%cd /content/text-generation-webui !python server.py --share --settings /content/settings.yaml --wbits 4 --groupsize 128 --extensions google_translate_plus --loader AutoGPTQ --model /content/text-generation-webui/models/airoboros-l2-13b-gpt4-2.0-GPTQ

#########################

and the full output is shown as following:

/content/text-generation-webui 2023-10-31 15:17:05 WARNING:The gradio "share link" feature uses a proprietary executable to create a reverse tunnel. Use it with care. 2023-10-31 15:17:11.028153: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2023-10-31 15:17:11.028215: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2023-10-31 15:17:11.028257: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2023-10-31 15:17:12.139827: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT 2023-10-31 15:17:16 INFO:Loading settings from /content/settings.yaml... 2023-10-31 15:17:16 INFO:Loading /content/text-generation-webui/models/airoboros-l2-13b-gpt4-2.0-GPTQ... 2023-10-31 15:17:16 INFO:The AutoGPTQ params are: {'model_basename': 'model', 'device': 'cuda:0', 'use_triton': False, 'inject_fused_attention': True, 'inject_fused_mlp': True, 'use_safetensors': True, 'trust_remote_code': False, 'max_memory': None, 'quantize_config': BaseQuantizeConfig(bits=4, group_size=128, damp_percent=0.01, desc_act=False, static_groups=False, sym=True, true_sequential=True, model_name_or_path=None, model_file_base_name=None), 'use_cuda_fp16': True, 'disable_exllama': False} 2023-10-31 15:18:06 WARNING:skip module injection for FusedLlamaMLPForQuantizedModel not support integrate without triton yet. 2023-10-31 15:18:06 WARNING:models/airoboros-l2-13b-gpt4-2.0-GPTQ/tokenizer_config.json is different from the original LlamaTokenizer file. It is either customized or outdated. 2023-10-31 15:18:06 WARNING:models/airoboros-l2-13b-gpt4-2.0-GPTQ/special_tokens_map.json is different from the original LlamaTokenizer file. It is either customized or outdated. 2023-10-31 15:18:06 INFO:Loaded the model in 49.96 seconds.

2023-10-31 15:18:06 INFO:Loading the extension "google_translate"... 2023-10-31 15:18:06 ERROR:Failed to load the extension "google_translate". Traceback (most recent call last): File "/content/text-generation-webui/modules/extensions.py", line 35, in load_extensions exec(f"import extensions.{name}.script") File "", line 1, in File "/content/text-generation-webui/extensions/google_translate/script.py", line 1, in {"payload":{"allShortcutsEnabled":false,"fileTree":{"extensions/google_translate":{"items":[{"name":"requirements.txt","path":"extensions/google_translate/requirements.txt","contentType":"file"},{"name":"script.py","path":"extensions/google_translate/script.py","contentType":"file"}],"totalCount":2},"extensions":{"items":[{"name":"Training_PRO","path":"extensions/Training_PRO","contentType":"directory"},{"name":"api","path":"extensions/api","contentType":"directory"},{"name":"character_bias","path":"extensions/character_bias","contentType":"directory"},{"name":"elevenlabs_tts","path":"extensions/elevenlabs_tts","contentType":"directory"},{"name":"example","path":"extensions/example","contentType":"directory"},{"name":"gallery","path":"extensions/gallery","contentType":"directory"},{"name":"google_translate","path":"extensions/google_translate","contentType":"directory"},{"name":"long_replies","path":"extensions/long_replies","contentType":"directory"},{"name":"multimodal","path":"extensions/multimodal","contentType":"directory"},{"name":"ngrok","path":"extensions/ngrok","contentType":"directory"},{"name":"openai","path":"extensions/openai","contentType":"directory"},{"name":"perplexity_colors","path":"extensions/perplexity_colors","contentType":"directory"},{"name":"sd_api_pictures","path":"extensions/sd_api_pictures","contentType":"directory"},{"name":"send_pictures","path":"extensions/send_pictures","contentType":"directory"},{"name":"silero_tts","path":"extensions/silero_tts","contentType":"directory"},{"name":"superbooga","path":"extensions/superbooga","contentType":"directory"},{"name":"superboogav2","path":"extensions/superboogav2","contentType":"directory"},{"name":"whisper_stt","path":"extensions/whisper_stt","contentType":"directory"}],"totalCount":18},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"api-examples","path":"api-examples","contentType":"directory"},{"name":"characters","path":"characters","contentType":"directory"},{"name":"css","path":"css","contentType":"directory"},{"name":"docker","path":"docker","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"extensions","path":"extensions","contentType":"directory"},{"name":"grammars","path":"grammars","contentType":"directory"},{"name":"instruction-templates","path":"instruction-templates","contentType":"directory"},{"name":"js","path":"js","contentType":"directory"},{"name":"loras","path":"loras","contentType":"directory"},{"name":"models","path":"models","contentType":"directory"},{"name":"modules","path":"modules","contentType":"directory"},{"name":"presets","path":"presets","contentType":"directory"},{"name":"prompts","path":"prompts","contentType":"directory"},{"name":"training","path":"training","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"CMD_FLAGS.txt","path":"CMD_FLAGS.txt","contentType":"file"},{"name":"Colab-TextGen-GPU.ipynb","path":"Colab-TextGen-GPU.ipynb","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"cmd_linux.sh","path":"cmd_linux.sh","contentType":"file"},{"name":"cmd_macos.sh","path":"cmd_macos.sh","contentType":"file"},{"name":"cmd_windows.bat","path":"cmd_windows.bat","contentType":"file"},{"name":"cmd_wsl.bat","path":"cmd_wsl.bat","contentType":"file"},{"name":"convert-to-safetensors.py","path":"convert-to-safetensors.py","contentType":"file"},{"name":"download-model.py","path":"download-model.py","contentType":"file"},{"name":"one_click.py","path":"one_click.py","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"},{"name":"requirements_amd.txt","path":"requirements_amd.txt","contentType":"file"},{"name":"requirements_amd_noavx2.txt","path":"requirements_amd_noavx2.txt","contentType":"file"},{"name":"requirements_apple_intel.txt","path":"requirements_apple_intel.txt","contentType":"file"},{"name":"requirements_apple_silicon.txt","path":"requirements_apple_silicon.txt","contentType":"file"},{"name":"requirements_cpu_only.txt","path":"requirements_cpu_only.txt","contentType":"file"},{"name":"requirements_cpu_only_noavx2.txt","path":"requirements_cpu_only_noavx2.txt","contentType":"file"},{"name":"requirements_noavx2.txt","path":"requirements_noavx2.txt","contentType":"file"},{"name":"requirements_nowheels.txt","path":"requirements_nowheels.txt","contentType":"file"},{"name":"server.py","path":"server.py","contentType":"file"},{"name":"settings-template.yaml","path":"settings-template.yaml","contentType":"file"},{"name":"start_linux.sh","path":"start_linux.sh","contentType":"file"},{"name":"start_macos.sh","path":"start_macos.sh","contentType":"file"},{"name":"start_windows.bat","path":"start_windows.bat","contentType":"file"},{"name":"start_wsl.bat","path":"start_wsl.bat","contentType":"file"},{"name":"update_linux.sh","path":"update_linux.sh","contentType":"file"},{"name":"update_macos.sh","path":"update_macos.sh","contentType":"file"},{"name":"update_windows.bat","path":"update_windows.bat","contentType":"file"},{"name":"update_wsl.bat","path":"update_wsl.bat","contentType":"file"},{"name":"wsl.sh","path":"wsl.sh","contentType":"file"}],"totalCount":48}},"fileTreeProcessingTime":13.34711,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":580642043,"defaultBranch":"main","name":"text-generation-webui","ownerLogin":"oobabooga","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-12-21T04:17:37.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/112222186?v=4","public":true,"private":false,"isOrgOwned":false},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"main","listCacheKey":"v0:1698697727.0","canEdit":false,"refType":"branch","currentOid":"262f8ae5bb49b2fb1d9aac9af01e3e5cd98765db"},"path":"extensions/google_translate/script.py","currentUser":null,"blob":{"rawLines":["import html","","import gradio as gr","from deep_translator import GoogleTranslator","","params = {"," \"activate\": True,"," \"language string\": \"ja\",","}","","language_codes = {'Afrikaans': 'af', 'Albanian': 'sq', 'Amharic': 'am', 'Arabic': 'ar', 'Armenian': 'hy', 'Azerbaijani': 'az', 'Basque': 'eu', 'Belarusian': 'be', 'Bengali': 'bn', 'Bosnian': 'bs', 'Bulgarian': 'bg', 'Catalan': 'ca', 'Cebuano': 'ceb', 'Chinese (Simplified)': 'zh-CN', 'Chinese (Traditional)': 'zh-TW', 'Corsican': 'co', 'Croatian': 'hr', 'Czech': 'cs', 'Danish': 'da', 'Dutch': 'nl', 'English': 'en', 'Esperanto': 'eo', 'Estonian': 'et', 'Finnish': 'fi', 'French': 'fr', 'Frisian': 'fy', 'Galician': 'gl', 'Georgian': 'ka', 'German': 'de', 'Greek': 'el', 'Gujarati': 'gu', 'Haitian Creole': 'ht', 'Hausa': 'ha', 'Hawaiian': 'haw', 'Hebrew': 'iw', 'Hindi': 'hi', 'Hmong': 'hmn', 'Hungarian': 'hu', 'Icelandic': 'is', 'Igbo': 'ig', 'Indonesian': 'id', 'Irish': 'ga', 'Italian': 'it', 'Japanese': 'ja', 'Javanese': 'jw', 'Kannada': 'kn', 'Kazakh': 'kk', 'Khmer': 'km', 'Korean': 'ko', 'Kurdish': 'ku', 'Kyrgyz': 'ky', 'Lao': 'lo', 'Latin': 'la', 'Latvian': 'lv', 'Lithuanian': 'lt', 'Luxembourgish': 'lb', 'Macedonian': 'mk', 'Malagasy': 'mg', 'Malay': 'ms', 'Malayalam': 'ml', 'Maltese': 'mt', 'Maori': 'mi', 'Marathi': 'mr', 'Mongolian': 'mn', 'Myanmar (Burmese)': 'my', 'Nepali': 'ne', 'Norwegian': 'no', 'Nyanja (Chichewa)': 'ny', 'Pashto': 'ps', 'Persian': 'fa', 'Polish': 'pl', 'Portuguese (Portugal, Brazil)': 'pt', 'Punjabi': 'pa', 'Romanian': 'ro', 'Russian': 'ru', 'Samoan': 'sm', 'Scots Gaelic': 'gd', 'Serbian': 'sr', 'Sesotho': 'st', 'Shona': 'sn', 'Sindhi': 'sd', 'Sinhala (Sinhalese)': 'si', 'Slovak': 'sk', 'Slovenian': 'sl', 'Somali': 'so', 'Spanish': 'es', 'Sundanese': 'su', 'Swahili': 'sw', 'Swedish': 'sv', 'Tagalog (Filipino)': 'tl', 'Tajik': 'tg', 'Tamil': 'ta', 'Telugu': 'te', 'Thai': 'th', 'Turkish': 'tr', 'Ukrainian': 'uk', 'Urdu': 'ur', 'Uzbek': 'uz', 'Vietnamese': 'vi', 'Welsh': 'cy', 'Xhosa': 'xh', 'Yiddish': 'yi', 'Yoruba': 'yo', 'Zulu': 'zu'}","","","def input_modifier(string):"," \"\"\""," This function is applied to your text inputs before"," they are fed into the model."," \"\"\""," if not params['activate']:"," return string",""," return GoogleTranslator(source=params['language string'], target='en').translate(string)","","","def output_modifier(string):"," \"\"\""," This function is applied to the model outputs."," \"\"\""," if not params['activate']:"," return string",""," translated_str = GoogleTranslator(source='en', target=params['language string']).translate(html.unescape(string))"," return html.escape(translated_str)","","","def bot_prefix_modifier(string):"," \"\"\""," This function is only applied in chat mode. It modifies"," the prefix text for the Bot and can be used to bias its"," behavior."," \"\"\"",""," return string","","","def ui():"," # Finding the language name from the language code to use as the default value"," language_name = list(language_codes.keys())[list(language_codes.values()).index(params['language string'])]",""," # Gradio elements"," with gr.Row():"," activate = gr.Checkbox(value=params['activate'], label='Activate translation')",""," with gr.Row():"," language = gr.Dropdown(value=language_name, choices=[k for k in language_codes], label='Language')",""," # Event functions to update the parameters in the backend"," activate.change(lambda x: params.update({\"activate\": x}), activate, None)"," language.change(lambda x: params.update({\"language string\": language_codes[x]}), language, None)"],"stylingDirectives":[[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":11,"cssClass":"pl-s1"}],[],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":13,"cssClass":"pl-s1"},{"start":14,"end":16,"cssClass":"pl-k"},{"start":17,"end":19,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":20,"cssClass":"pl-s1"},{"start":21,"end":27,"cssClass":"pl-k"},{"start":28,"end":44,"cssClass":"pl-v"}],[],[{"start":0,"end":6,"cssClass":"pl-s1"},{"start":7,"end":8,"cssClass":"pl-c1"}],[{"start":4,"end":14,"cssClass":"pl-s"},{"start":16,"end":20,"cssClass":"pl-c1"}],[{"start":4,"end":21,"cssClass":"pl-s"},{"start":23,"end":27,"cssClass":"pl-s"}],[],[],[{"start":0,"end":14,"cssClass":"pl-s1"},{"start":15,"end":16,"cssClass":"pl-c1"},{"start":18,"end":29,"cssClass":"pl-s"},{"start":31,"end":35,"cssClass":"pl-s"},{"start":37,"end":47,"cssClass":"pl-s"},{"start":49,"end":53,"cssClass":"pl-s"},{"start":55,"end":64,"cssClass":"pl-s"},{"start":66,"end":70,"cssClass":"pl-s"},{"start":72,"end":80,"cssClass":"pl-s"},{"start":82,"end":86,"cssClass":"pl-s"},{"start":88,"end":98,"cssClass":"pl-s"},{"start":100,"end":104,"cssClass":"pl-s"},{"start":106,"end":119,"cssClass":"pl-s"},{"start":121,"end":125,"cssClass":"pl-s"},{"start":127,"end":135,"cssClass":"pl-s"},{"start":137,"end":141,"cssClass":"pl-s"},{"start":143,"end":155,"cssClass":"pl-s"},{"start":157,"end":161,"cssClass":"pl-s"},{"start":163,"end":172,"cssClass":"pl-s"},{"start":174,"end":178,"cssClass":"pl-s"},{"start":180,"end":189,"cssClass":"pl-s"},{"start":191,"end":195,"cssClass":"pl-s"},{"start":197,"end":208,"cssClass":"pl-s"},{"start":210,"end":214,"cssClass":"pl-s"},{"start":216,"end":225,"cssClass":"pl-s"},{"start":227,"end":231,"cssClass":"pl-s"},{"start":233,"end":242,"cssClass":"pl-s"},{"start":244,"end":249,"cssClass":"pl-s"},{"start":251,"end":273,"cssClass":"pl-s"},{"start":275,"end":282,"cssClass":"pl-s"},{"start":284,"end":307,"cssClass":"pl-s"},{"start":309,"end":316,"cssClass":"pl-s"},{"start":318,"end":328,"cssClass":"pl-s"},{"start":330,"end":334,"cssClass":"pl-s"},{"start":336,"end":346,"cssClass":"pl-s"},{"start":348,"end":352,"cssClass":"pl-s"},{"start":354,"end":361,"cssClass":"pl-s"},{"start":363,"end":367,"cssClass":"pl-s"},{"start":369,"end":377,"cssClass":"pl-s"},{"start":379,"end":383,"cssClass":"pl-s"},{"start":385,"end":392,"cssClass":"pl-s"},{"start":394,"end":398,"cssClass":"pl-s"},{"start":400,"end":409,"cssClass":"pl-s"},{"start":411,"end":415,"cssClass":"pl-s"},{"start":417,"end":428,"cssClass":"pl-s"},{"start":430,"end":434,"cssClass":"pl-s"},{"start":436,"end":446,"cssClass":"pl-s"},{"start":448,"end":452,"cssClass":"pl-s"},{"start":454,"end":463,"cssClass":"pl-s"},{"start":465,"end":469,"cssClass":"pl-s"},{"start":471,"end":479,"cssClass":"pl-s"},{"start":481,"end":485,"cssClass":"pl-s"},{"start":487,"end":496,"cssClass":"pl-s"},{"start":498,"end":502,"cssClass":"pl-s"},{"start":504,"end":514,"cssClass":"pl-s"},{"start":516,"end":520,"cssClass":"pl-s"},{"start":522,"end":532,"cssClass":"pl-s"},{"start":534,"end":538,"cssClass":"pl-s"},{"start":540,"end":548,"cssClass":"pl-s"},{"start":550,"end":554,"cssClass":"pl-s"},{"start":556,"end":563,"cssClass":"pl-s"},{"start":565,"end":569,"cssClass":"pl-s"},{"start":571,"end":581,"cssClass":"pl-s"},{"start":583,"end":587,"cssClass":"pl-s"},{"start":589,"end":605,"cssClass":"pl-s"},{"start":607,"end":611,"cssClass":"pl-s"},{"start":613,"end":620,"cssClass":"pl-s"},{"start":622,"end":626,"cssClass":"pl-s"},{"start":628,"end":638,"cssClass":"pl-s"},{"start":640,"end":645,"cssClass":"pl-s"},{"start":647,"end":655,"cssClass":"pl-s"},{"start":657,"end":661,"cssClass":"pl-s"},{"start":663,"end":670,"cssClass":"pl-s"},{"start":672,"end":676,"cssClass":"pl-s"},{"start":678,"end":685,"cssClass":"pl-s"},{"start":687,"end":692,"cssClass":"pl-s"},{"start":694,"end":705,"cssClass":"pl-s"},{"start":707,"end":711,"cssClass":"pl-s"},{"start":713,"end":724,"cssClass":"pl-s"},{"start":726,"end":730,"cssClass":"pl-s"},{"start":732,"end":738,"cssClass":"pl-s"},{"start":740,"end":744,"cssClass":"pl-s"},{"start":746,"end":758,"cssClass":"pl-s"},{"start":760,"end":764,"cssClass":"pl-s"},{"start":766,"end":773,"cssClass":"pl-s"},{"start":775,"end":779,"cssClass":"pl-s"},{"start":781,"end":790,"cssClass":"pl-s"},{"start":792,"end":796,"cssClass":"pl-s"},{"start":798,"end":808,"cssClass":"pl-s"},{"start":810,"end":814,"cssClass":"pl-s"},{"start":816,"end":826,"cssClass":"pl-s"},{"start":828,"end":832,"cssClass":"pl-s"},{"start":834,"end":843,"cssClass":"pl-s"},{"start":845,"end":849,"cssClass":"pl-s"},{"start":851,"end":859,"cssClass":"pl-s"},{"start":861,"end":865,"cssClass":"pl-s"},{"start":867,"end":874,"cssClass":"pl-s"},{"start":876,"end":880,"cssClass":"pl-s"},{"start":882,"end":890,"cssClass":"pl-s"},{"start":892,"end":896,"cssClass":"pl-s"},{"start":898,"end":907,"cssClass":"pl-s"},{"start":909,"end":913,"cssClass":"pl-s"},{"start":915,"end":923,"cssClass":"pl-s"},{"start":925,"end":929,"cssClass":"pl-s"},{"start":931,"end":936,"cssClass":"pl-s"},{"start":938,"end":942,"cssClass":"pl-s"},{"start":944,"end":951,"cssClass":"pl-s"},{"start":953,"end":957,"cssClass":"pl-s"},{"start":959,"end":968,"cssClass":"pl-s"},{"start":970,"end":974,"cssClass":"pl-s"},{"start":976,"end":988,"cssClass":"pl-s"},{"start":990,"end":994,"cssClass":"pl-s"},{"start":996,"end":1011,"cssClass":"pl-s"},{"start":1013,"end":1017,"cssClass":"pl-s"},{"start":1019,"end":1031,"cssClass":"pl-s"},{"start":1033,"end":1037,"cssClass":"pl-s"},{"start":1039,"end":1049,"cssClass":"pl-s"},{"start":1051,"end":1055,"cssClass":"pl-s"},{"start":1057,"end":1064,"cssClass":"pl-s"},{"start":1066,"end":1070,"cssClass":"pl-s"},{"start":1072,"end":1083,"cssClass":"pl-s"},{"start":1085,"end":1089,"cssClass":"pl-s"},{"start":1091,"end":1100,"cssClass":"pl-s"},{"start":1102,"end":1106,"cssClass":"pl-s"},{"start":1108,"end":1115,"cssClass":"pl-s"},{"start":1117,"end":1121,"cssClass":"pl-s"},{"start":1123,"end":1132,"cssClass":"pl-s"},{"start":1134,"end":1138,"cssClass":"pl-s"},{"start":1140,"end":1151,"cssClass":"pl-s"},{"start":1153,"end":1157,"cssClass":"pl-s"},{"start":1159,"end":1178,"cssClass":"pl-s"},{"start":1180,"end":1184,"cssClass":"pl-s"},{"start":1186,"end":1194,"cssClass":"pl-s"},{"start":1196,"end":1200,"cssClass":"pl-s"},{"start":1202,"end":1213,"cssClass":"pl-s"},{"start":1215,"end":1219,"cssClass":"pl-s"},{"start":1221,"end":1240,"cssClass":"pl-s"},{"start":1242,"end":1246,"cssClass":"pl-s"},{"start":1248,"end":1256,"cssClass":"pl-s"},{"start":1258,"end":1262,"cssClass":"pl-s"},{"start":1264,"end":1273,"cssClass":"pl-s"},{"start":1275,"end":1279,"cssClass":"pl-s"},{"start":1281,"end":1289,"cssClass":"pl-s"},{"start":1291,"end":1295,"cssClass":"pl-s"},{"start":1297,"end":1328,"cssClass":"pl-s"},{"start":1330,"end":1334,"cssClass":"pl-s"},{"start":1336,"end":1345,"cssClass":"pl-s"},{"start":1347,"end":1351,"cssClass":"pl-s"},{"start":1353,"end":1363,"cssClass":"pl-s"},{"start":1365,"end":1369,"cssClass":"pl-s"},{"start":1371,"end":1380,"cssClass":"pl-s"},{"start":1382,"end":1386,"cssClass":"pl-s"},{"start":1388,"end":1396,"cssClass":"pl-s"},{"start":1398,"end":1402,"cssClass":"pl-s"},{"start":1404,"end":1418,"cssClass":"pl-s"},{"start":1420,"end":1424,"cssClass":"pl-s"},{"start":1426,"end":1435,"cssClass":"pl-s"},{"start":1437,"end":1441,"cssClass":"pl-s"},{"start":1443,"end":1452,"cssClass":"pl-s"},{"start":1454,"end":1458,"cssClass":"pl-s"},{"start":1460,"end":1467,"cssClass":"pl-s"},{"start":1469,"end":1473,"cssClass":"pl-s"},{"start":1475,"end":1483,"cssClass":"pl-s"},{"start":1485,"end":1489,"cssClass":"pl-s"},{"start":1491,"end":1512,"cssClass":"pl-s"},{"start":1514,"end":1518,"cssClass":"pl-s"},{"start":1520,"end":1528,"cssClass":"pl-s"},{"start":1530,"end":1534,"cssClass":"pl-s"},{"start":1536,"end":1547,"cssClass":"pl-s"},{"start":1549,"end":1553,"cssClass":"pl-s"},{"start":1555,"end":1563,"cssClass":"pl-s"},{"start":1565,"end":1569,"cssClass":"pl-s"},{"start":1571,"end":1580,"cssClass":"pl-s"},{"start":1582,"end":1586,"cssClass":"pl-s"},{"start":1588,"end":1599,"cssClass":"pl-s"},{"start":1601,"end":1605,"cssClass":"pl-s"},{"start":1607,"end":1616,"cssClass":"pl-s"},{"start":1618,"end":1622,"cssClass":"pl-s"},{"start":1624,"end":1633,"cssClass":"pl-s"},{"start":1635,"end":1639,"cssClass":"pl-s"},{"start":1641,"end":1661,"cssClass":"pl-s"},{"start":1663,"end":1667,"cssClass":"pl-s"},{"start":1669,"end":1676,"cssClass":"pl-s"},{"start":1678,"end":1682,"cssClass":"pl-s"},{"start":1684,"end":1691,"cssClass":"pl-s"},{"start":1693,"end":1697,"cssClass":"pl-s"},{"start":1699,"end":1707,"cssClass":"pl-s"},{"start":1709,"end":1713,"cssClass":"pl-s"},{"start":1715,"end":1721,"cssClass":"pl-s"},{"start":1723,"end":1727,"cssClass":"pl-s"},{"start":1729,"end":1738,"cssClass":"pl-s"},{"start":1740,"end":1744,"cssClass":"pl-s"},{"start":1746,"end":1757,"cssClass":"pl-s"},{"start":1759,"end":1763,"cssClass":"pl-s"},{"start":1765,"end":1771,"cssClass":"pl-s"},{"start":1773,"end":1777,"cssClass":"pl-s"},{"start":1779,"end":1786,"cssClass":"pl-s"},{"start":1788,"end":1792,"cssClass":"pl-s"},{"start":1794,"end":1806,"cssClass":"pl-s"},{"start":1808,"end":1812,"cssClass":"pl-s"},{"start":1814,"end":1821,"cssClass":"pl-s"},{"start":1823,"end":1827,"cssClass":"pl-s"},{"start":1829,"end":1836,"cssClass":"pl-s"},{"start":1838,"end":1842,"cssClass":"pl-s"},{"start":1844,"end":1853,"cssClass":"pl-s"},{"start":1855,"end":1859,"cssClass":"pl-s"},{"start":1861,"end":1869,"cssClass":"pl-s"},{"start":1871,"end":1875,"cssClass":"pl-s"},{"start":1877,"end":1883,"cssClass":"pl-s"},{"start":1885,"end":1889,"cssClass":"pl-s"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":18,"cssClass":"pl-en"},{"start":19,"end":25,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-s"}],[{"start":0,"end":55,"cssClass":"pl-s"}],[{"start":0,"end":32,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"}],[{"start":4,"end":6,"cssClass":"pl-k"},{"start":7,"end":10,"cssClass":"pl-c1"},{"start":11,"end":17,"cssClass":"pl-s1"},{"start":18,"end":28,"cssClass":"pl-s"}],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":21,"cssClass":"pl-s1"}],[],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":27,"cssClass":"pl-v"},{"start":28,"end":34,"cssClass":"pl-s1"},{"start":34,"end":35,"cssClass":"pl-c1"},{"start":35,"end":41,"cssClass":"pl-s1"},{"start":42,"end":59,"cssClass":"pl-s"},{"start":62,"end":68,"cssClass":"pl-s1"},{"start":68,"end":69,"cssClass":"pl-c1"},{"start":69,"end":73,"cssClass":"pl-s"},{"start":75,"end":84,"cssClass":"pl-en"},{"start":85,"end":91,"cssClass":"pl-s1"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":19,"cssClass":"pl-en"},{"start":20,"end":26,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-s"}],[{"start":0,"end":50,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"}],[{"start":4,"end":6,"cssClass":"pl-k"},{"start":7,"end":10,"cssClass":"pl-c1"},{"start":11,"end":17,"cssClass":"pl-s1"},{"start":18,"end":28,"cssClass":"pl-s"}],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":21,"cssClass":"pl-s1"}],[],[{"start":4,"end":18,"cssClass":"pl-s1"},{"start":19,"end":20,"cssClass":"pl-c1"},{"start":21,"end":37,"cssClass":"pl-v"},{"start":38,"end":44,"cssClass":"pl-s1"},{"start":44,"end":45,"cssClass":"pl-c1"},{"start":45,"end":49,"cssClass":"pl-s"},{"start":51,"end":57,"cssClass":"pl-s1"},{"start":57,"end":58,"cssClass":"pl-c1"},{"start":58,"end":64,"cssClass":"pl-s1"},{"start":65,"end":82,"cssClass":"pl-s"},{"start":85,"end":94,"cssClass":"pl-en"},{"start":95,"end":99,"cssClass":"pl-s1"},{"start":100,"end":108,"cssClass":"pl-en"},{"start":109,"end":115,"cssClass":"pl-s1"}],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":15,"cssClass":"pl-s1"},{"start":16,"end":22,"cssClass":"pl-en"},{"start":23,"end":37,"cssClass":"pl-s1"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":23,"cssClass":"pl-en"},{"start":24,"end":30,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":13,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"}],[],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":17,"cssClass":"pl-s1"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":6,"cssClass":"pl-en"}],[{"start":4,"end":82,"cssClass":"pl-c"}],[{"start":4,"end":17,"cssClass":"pl-s1"},{"start":18,"end":19,"cssClass":"pl-c1"},{"start":20,"end":24,"cssClass":"pl-en"},{"start":25,"end":39,"cssClass":"pl-s1"},{"start":40,"end":44,"cssClass":"pl-en"},{"start":48,"end":52,"cssClass":"pl-en"},{"start":53,"end":67,"cssClass":"pl-s1"},{"start":68,"end":74,"cssClass":"pl-en"},{"start":78,"end":83,"cssClass":"pl-en"},{"start":84,"end":90,"cssClass":"pl-s1"},{"start":91,"end":108,"cssClass":"pl-s"}],[],[{"start":4,"end":21,"cssClass":"pl-c"}],[{"start":4,"end":8,"cssClass":"pl-k"},{"start":9,"end":11,"cssClass":"pl-s1"},{"start":12,"end":15,"cssClass":"pl-v"}],[{"start":8,"end":16,"cssClass":"pl-s1"},{"start":17,"end":18,"cssClass":"pl-c1"},{"start":19,"end":21,"cssClass":"pl-s1"},{"start":22,"end":30,"cssClass":"pl-v"},{"start":31,"end":36,"cssClass":"pl-s1"},{"start":36,"end":37,"cssClass":"pl-c1"},{"start":37,"end":43,"cssClass":"pl-s1"},{"start":44,"end":54,"cssClass":"pl-s"},{"start":57,"end":62,"cssClass":"pl-s1"},{"start":62,"end":63,"cssClass":"pl-c1"},{"start":63,"end":85,"cssClass":"pl-s"}],[],[{"start":4,"end":8,"cssClass":"pl-k"},{"start":9,"end":11,"cssClass":"pl-s1"},{"start":12,"end":15,"cssClass":"pl-v"}],[{"start":8,"end":16,"cssClass":"pl-s1"},{"start":17,"end":18,"cssClass":"pl-c1"},{"start":19,"end":21,"cssClass":"pl-s1"},{"start":22,"end":30,"cssClass":"pl-v"},{"start":31,"end":36,"cssClass":"pl-s1"},{"start":36,"end":37,"cssClass":"pl-c1"},{"start":37,"end":50,"cssClass":"pl-s1"},{"start":52,"end":59,"cssClass":"pl-s1"},{"start":59,"end":60,"cssClass":"pl-c1"},{"start":61,"end":62,"cssClass":"pl-s1"},{"start":63,"end":66,"cssClass":"pl-k"},{"start":67,"end":68,"cssClass":"pl-s1"},{"start":69,"end":71,"cssClass":"pl-c1"},{"start":72,"end":86,"cssClass":"pl-s1"},{"start":89,"end":94,"cssClass":"pl-s1"},{"start":94,"end":95,"cssClass":"pl-c1"},{"start":95,"end":105,"cssClass":"pl-s"}],[],[{"start":4,"end":61,"cssClass":"pl-c"}],[{"start":4,"end":12,"cssClass":"pl-s1"},{"start":13,"end":19,"cssClass":"pl-en"},{"start":20,"end":26,"cssClass":"pl-k"},{"start":27,"end":28,"cssClass":"pl-s1"},{"start":30,"end":36,"cssClass":"pl-s1"},{"start":37,"end":43,"cssClass":"pl-en"},{"start":45,"end":55,"cssClass":"pl-s"},{"start":57,"end":58,"cssClass":"pl-s1"},{"start":62,"end":70,"cssClass":"pl-s1"},{"start":72,"end":76,"cssClass":"pl-c1"}],[{"start":4,"end":12,"cssClass":"pl-s1"},{"start":13,"end":19,"cssClass":"pl-en"},{"start":20,"end":26,"cssClass":"pl-k"},{"start":27,"end":28,"cssClass":"pl-s1"},{"start":30,"end":36,"cssClass":"pl-s1"},{"start":37,"end":43,"cssClass":"pl-en"},{"start":45,"end":62,"cssClass":"pl-s"},{"start":64,"end":78,"cssClass":"pl-s1"},{"start":79,"end":80,"cssClass":"pl-s1"},{"start":85,"end":93,"cssClass":"pl-s1"},{"start":95,"end":99,"cssClass":"pl-c1"}]],"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/oobabooga/text-generation-webui/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null,"repoAlertsPath":"/oobabooga/text-generation-webui/security/dependabot","repoSecurityAndAnalysisPath":"/oobabooga/text-generation-webui/settings/security_analysis","repoOwnerIsOrg":false,"currentUserCanAdminRepo":false},"displayName":"script.py","displayUrl":"https://github.com/oobabooga/text-generation-webui/blob/main/extensions/google_translate/script.py?raw=true","headerInfo":{"blobSize":"3.45 KB","deleteInfo":{"deleteTooltip":"You must be signed in to make or propose changes"},"editInfo":{"editTooltip":"You must be signed in to make or propose changes"},"ghDesktopPath":"https://desktop.github.com/","gitLfsPath":null,"onBranch":true,"shortPath":"784668c","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Foobabooga%2Ftext-generation-webui%2Fblob%2Fmain%2Fextensions%2Fgoogle_translate%2Fscript.py","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"59","truncatedSloc":"42"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplateHelpUrl":"https://docs.github.com/articles/about-issue-and-pull-request-templates","issueTemplate":null,"discussionTemplate":null,"language":"Python","languageID":303,"large":false,"loggedIn":false,"newDiscussionPath":"/oobabooga/text-generation-webui/discussions/new","newIssuePath":"/oobabooga/text-generation-webui/issues/new","planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/oobabooga/text-generation-webui/blob/main/extensions/google_translate/script.py","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","dismissStackNoticePath":"/settings/dismiss-notice/publish_stack_from_file","releasePath":"/oobabooga/text-generation-webui/releases/new?marketplace=true","showPublishActionBanner":false,"showPublishStackBanner":false},"rawBlobUrl":"https://github.com/oobabooga/text-generation-webui/raw/main/extensions/google_translate/script.py","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"repoOwner":"oobabooga","repoName":"text-generation-webui","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","showDependabotConfigurationBanner":false,"actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timedOut":false,"notAnalyzed":false,"symbols":[{"name":"params","kind":"constant","identStart":79,"identEnd":85,"extentStart":79,"extentEnd":142,"fullyQualifiedName":"params","identUtf16":{"start":{"lineNumber":5,"utf16Col":0},"end":{"lineNumber":5,"utf16Col":6}},"extentUtf16":{"start":{"lineNumber":5,"utf16Col":0},"end":{"lineNumber":8,"utf16Col":1}}},{"name":"language_codes","kind":"constant","identStart":144,"identEnd":158,"extentStart":144,"extentEnd":2034,"fullyQualifiedName":"language_codes","identUtf16":{"start":{"lineNumber":10,"utf16Col":0},"end":{"lineNumber":10,"utf16Col":14}},"extentUtf16":{"start":{"lineNumber":10,"utf16Col":0},"end":{"lineNumber":10,"utf16Col":1890}}},{"name":"input_modifier","kind":"function","identStart":2041,"identEnd":2055,"extentStart":2037,"extentEnd":2316,"fullyQualifiedName":"input_modifier","identUtf16":{"start":{"lineNumber":13,"utf16Col":4},"end":{"lineNumber":13,"utf16Col":18}},"extentUtf16":{"start":{"lineNumber":13,"utf16Col":0},"end":{"lineNumber":21,"utf16Col":92}}},{"name":"output_modifier","kind":"function","identStart":2323,"identEnd":2338,"extentStart":2319,"extentEnd":2625,"fullyQualifiedName":"output_modifier","identUtf16":{"start":{"lineNumber":24,"utf16Col":4},"end":{"lineNumber":24,"utf16Col":19}},"extentUtf16":{"start":{"lineNumber":24,"utf16Col":0},"end":{"lineNumber":32,"utf16Col":38}}},{"name":"bot_prefix_modifier","kind":"function","identStart":2632,"identEnd":2651,"extentStart":2628,"extentEnd":2829,"fullyQualifiedName":"bot_prefix_modifier","identUtf16":{"start":{"lineNumber":35,"utf16Col":4},"end":{"lineNumber":35,"utf16Col":23}},"extentUtf16":{"start":{"lineNumber":35,"utf16Col":0},"end":{"lineNumber":42,"utf16Col":17}}},{"name":"ui","kind":"function","identStart":2836,"identEnd":2838,"extentStart":2832,"extentEnd":3534,"fullyQualifiedName":"ui","identUtf16":{"start":{"lineNumber":45,"utf16Col":4},"end":{"lineNumber":45,"utf16Col":6}},"extentUtf16":{"start":{"lineNumber":45,"utf16Col":0},"end":{"lineNumber":58,"utf16Col":100}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/oobabooga/text-generation-webui/branches":{"post":"TMraCGtjwxPB11SC4YZc1H4lu2UZDM4fvUyi_NNnisMWtXleu9lpEPoe73KvODYQbuoZPvJdZ4ERADOIEY3L5w"},"/repos/preferences":{"post":"pCQoAFWl6rGWdB6XWMhcLZ0-TdNwz-q23i6D7at-ErvX5m0ZYI5htPyvxiDXQr-aQ5eIRhbdgpz0X_UBJJXAGg"}}},"title":"text-generation-webui/extensions/google_translate/script.py at main · oobabooga/text-generation-webui"} NameError: name 'false' is not defined