diff --git "a/app.py" "b/app.py" --- "a/app.py" +++ "b/app.py" @@ -37,6 +37,8 @@ import whisper import tempfile import json import shutil +from PyPDF2 import PdfReader +from gradio_client import Client #When I forgot about the readme file ChatGPT suggested these - Leaving to remember the Readme.md must be updated as well #print(gr.__version__) @@ -1884,7 +1886,7 @@ def w4wsidebysidereadergen(text, langdest): FinalOutput = "Side by Side Version: " + FinalOutput - analysisPrompt = f"{ Translated } and \n\nFWFWO: \n{ translatedFWO.text } \n\nForeign Words Native Word Order and Foreign Word Order \nIf you had to make the notes on the word by word considerations to transform FWNWO to FWFWO what would that be? (A simple game idea where your response will be the rubrik to mark the players response against)" + analysisPrompt = f"{ Translated } \n\nand \n\nFWFWO: \n{ translatedFWO.text } \n\nForeign Words Native Word Order and Foreign Word Order \nIf you had to make the notes on the word by word considerations to transform FWNWO to FWFWO what would that be? (A simple game idea where your response will be the rubrik to mark the players response against)" return FinalOutput, Translated, "FWFWO: \n" + translatedFWO.text, "CurrentSidebySideTTSFile.mp3", analysisPrompt #https://huggingface.co/spaces/Geonmo/nllb-translation-demo/blob/main/app.py @@ -1908,8 +1910,10 @@ def nllbtranscload_models(): model_dict = nllbtranscload_models() nllb_lang_codes = list(flores_codes.keys()) +nllbtranscputotalhistorytext = "Outputs from the above" def nllbtransctranslation(source, target, text): + global nllbtranscputotalhistorytext #if len(model_dict) == 2: model_name = 'nllb-distilled-600M' @@ -1933,18 +1937,23 @@ def nllbtransctranslation(source, target, text): 'source': source, 'target': target, 'result': output} - return result['result'], result['inference_time'] + + nllbtranscputotalhistorytext += "\n\n" + result['result'] + return result['result'], result['inference_time'], nllbtranscputotalhistorytext def nllbtransctranslationoptionalw4w(source, target, text): + global nllbtranscputotalhistorytext FinalOutput = "" FinalInference = 0 + nllbtranscputotalhistorytext += "\n\n" textlist = text.split() for item in textlist: - currentitem, currentinference = nllbtransctranslation(source, target, item) + currentitem, currentinference, _ = nllbtransctranslation(source, target, item) FinalOutput += item + f" ({ str(currentitem) }) " + nllbtranscputotalhistorytext += item + f" ({ str(currentitem) }) " FinalInference += float(currentinference) - yield FinalOutput, str(FinalInference) + yield FinalOutput, str(FinalInference), nllbtranscputotalhistorytext #pip install tokenizers==0.13.3 protobuf==3.20.0 - dependency debugging before convert to docker @@ -2035,37 +2044,6 @@ def letterbased_guess_word(target, guess): #---------------------------------------------------------------------------------------------------------------------------- -speedmastery_load_imagesinput = gr.Files(file_count="multiple", type="binary") #, file_types='image') - -def speedmastery_load_images(image_files): - # print(image_files) - # #return [image_file for image_file in image_files] - # images = [] - # for image_file in image_files: - # # Read the image file and convert it to a PIL.Image object - # image = Image.open(io.BytesIO(image_file)) - # images.append(image) - # return images - - images = [] - for image_file in image_files: - # Save the file to a temporary directory - temp_dir = tempfile.gettempdir() - file_path = os.path.join(temp_dir, image_file.name) - with open(file_path, 'wb') as f: - f.write(image_file.read()) - - # Now you can use the file path - image = Image.open(file_path) - images.append(image) - - # Optionally, delete the file after processing if it's no longer needed - os.remove(file_path) - - return images - -#---------------------------------------------------------------------------------------------------------------------------- - def whisperlocaltts(filename): model = whisper.load_model("base") audio = whisper.load_audio(filename) @@ -2224,15 +2202,320 @@ def display_subtitles_from_zip(zip_file_path): finally: shutil.rmtree(temp_dir) # Clean up the temporary directory - +#------------------------------------------------------------------------------------------------------------------------- + +nllbtrans_original_order = None + +# Function to check the user's guesses +def nllbtrans_check_order(*inputs): + global nllbtrans_original_order + # Fill unselected dropdowns with 0 + guesses = [int(inp) if inp else 0 for inp in inputs] + if guesses == nllbtrans_original_order: + return "Correct Order!" + else: + return "Incorrect Order! Try Again. Ensure all dropdowns are selected." + +# ---------------------------------------------------------------------------------------------------- + +def audioformatbrainstorm(chunkmode, translate, text, langdestchoice, choice): + FrontRevSentChunkbrainstormoutput = FrontRevSentChunk(chunkmode, translate, text, langdestchoice) + AutoSyllablePracticebrainstormoutput = AutoSyllablePractice(text) + RandomiseTextbyTypebrainstormoutput = RandomiseTextbyType(text, choice) + create_dictionarybrainstormoutput = create_dictionary(text) + keep_nouns_verbsbrainstormoutput = keep_nouns_verbs(text) + split_verbs_nounsbrainstormoutput = split_verbs_nouns(text) + SimultaneousSpellingPracbrainstormoutput = SimultaneousSpellingPrac(text) + FirstLetterSummarybrainstormoutput = FirstLetterSummary(text) + AutoChorusPerWordSchedulerbrainstormoutput = AutoChorusPerWordScheduler(text) + return FrontRevSentChunkbrainstormoutput, AutoSyllablePracticebrainstormoutput, RandomiseTextbyTypebrainstormoutput, create_dictionarybrainstormoutput, keep_nouns_verbsbrainstormoutput, split_verbs_nounsbrainstormoutput[0], split_verbs_nounsbrainstormoutput[1], split_verbs_nounsbrainstormoutput[2], SimultaneousSpellingPracbrainstormoutput, FirstLetterSummarybrainstormoutput, AutoChorusPerWordSchedulerbrainstormoutput + +# ---------------------------------------------------------------------------------------------------- + +def autoprocessrender_extract_text_from_pdf(pdf_file): + reader = PdfReader(pdf_file) + text = "" + for page in reader.pages: + text += page.extract_text() + return text + +def autoprocessrender_read_text_file(text_file): + return text_file.read().decode('utf-8') + +def autoprocessrender_split_text_into_chunks(text, chunk_size=2000): + return [text[i:i+chunk_size] for i in range(0, len(text), chunk_size)] + +def autoprocessrender_find_words_ending_in_s(text): + words = text.split() + return [word for word in words if word.endswith('s')] + +def autoprocessrender_handle_pdf(pdf_file): + text = autoprocessrender_extract_text_from_pdf(pdf_file) + return autoprocessrender_split_text_into_chunks(text) + +def autoprocessrender_handle_text_file(text_file): + text = autoprocessrender_read_text_file(text_file) + return autoprocessrender_split_text_into_chunks(text) + +def autoprocessrender_generate_ai_notes(chunk): + FinalOutput = "Analysed Text placeholder for - " + chunk + return FinalOutput + +def autoprocessrender_save_all_text(chunks, notes, ai_notes): + all_text = "" + for i, chunk in enumerate(chunks): + all_text += f"Chunk {i+1}:\n{chunk}\nNotes:\n{notes[i]}\nAI Notes:\n{ai_notes[i]}\n\n" + return all_text + +def partial_NWOtranslate_closed_class_words(text, sidebyside=True): + # Updated dictionaries + prepositions = { + 'of': 'von', + 'in': 'in', + 'on': 'auf', + 'at': 'bei', + 'by': 'durch', + 'with': 'mit', + 'from': 'aus', + 'to': 'zu', + 'under': 'unter', + 'above': 'über', + 'up': 'hinauf', + 'down': 'hinunter', + 'over': 'über', + 'across': 'über', + 'through': 'durch', + 'against': 'gegen', + 'among': 'unter', + 'within': 'innerhalb', + 'without': 'ohne', + 'before': 'vor', + 'after': 'nach', + 'between': 'zwischen', + 'during': 'während', + 'towards': 'zu', + 'except': 'außer', + 'like': 'wie' + } + + conjunctions = { + 'and': 'und', + 'but': 'aber', + 'or': 'oder', + 'nor': 'noch', + 'for': 'für', + 'so': 'also', + 'yet': 'doch', + 'after': 'nachdem', + 'although': 'obwohl', + 'though': 'obgleich', + 'because': 'weil', + 'if': 'wenn', + 'unless': 'es sei denn', + 'since': 'seit', + 'while': 'während', + 'until': 'bis', + 'as': 'wie', + 'when': 'wenn', + 'where': 'wo', + 'whether': 'ob' + } + + articles = { + 'the': 'der', + 'a': 'ein', + 'an': 'ein' + } + + auxiliary_verbs = { + 'will': 'werden', + 'would': 'würde', + 'shall': 'soll', + 'should': 'sollte', + 'can': 'kann', + 'could': 'könnte', + 'may': 'darf', + 'might': 'möchte', + 'must': 'muss', + 'do': 'tun', + 'am': 'bin', + 'is': 'ist', + 'are': 'sind', + 'was': 'war', + 'were': 'waren', + 'being': 'seiend', + 'been': 'gewesen', + 'has': 'hat', + 'have': 'haben', + 'had': 'hatte', + 'does': 'tut', + 'did': 'tat' + } + + pronouns = { + 'I': 'ich', + 'you': 'du', + 'he': 'er', + 'him': 'ihn', + 'his': 'sein', + 'she': 'sie', + 'her': 'ihr', + 'it': 'es', + 'we': 'wir', + 'us': 'uns', + 'they': 'sie', + 'them': 'sie', + 'me': 'mich', + 'my': 'mein', + 'myself': 'mich selbst', + 'your': 'dein', + 'yours': 'dein', + 'himself': 'sich selbst', + 'herself': 'sich selbst', + 'itself': 'sich selbst', + 'ourselves': 'uns selbst', + 'yourselves': 'euch selbst', + 'themselves': 'sich selbst', + 'its': 'sein', + 'ours': 'unsere', + 'theirs': 'ihre', + 'which': 'welche', + 'who': 'wer', + 'whom': 'wen', + 'whose': 'wessen', + 'that': 'das', + 'these': 'diese', + 'those': 'jene', + 'this': 'dies', + 'what': 'was', + 'any': 'irgendein', + 'all': 'alle', + 'some': 'einige', + 'none': 'keiner' + } + + adverbs = { + 'very': 'sehr', + 'well': 'gut', + 'fast': 'schnell', + 'hard': 'hart', + 'loud': 'laut', + 'far': 'weit', + 'long': 'lang', + 'high': 'hoch', + 'deep': 'tief', + 'old': 'alt', + 'new': 'neu', + 'just': 'gerade', + 'almost': 'fast', + 'already': 'schon', + 'even': 'sogar', + 'still': 'noch', + 'yet': 'noch', + 'too': 'zu', + 'much': 'viel', + 'so': 'so', + 'enough': 'genug', + 'extremely': 'äußerst', + 'incredibly': 'unglaublich', + 'really': 'wirklich', + 'highly': 'hoch', + 'fairly': 'ziemlich', + 'quite': 'ziemlich', + 'nearly': 'fast', + 'utterly': 'völlig', + 'here': 'hier', + 'there': 'dort', + 'where': 'wo', + 'when': 'wann', + 'why': 'warum', + 'how': 'wie', + 'now': 'jetzt', + 'then': 'dann', + 'always': 'immer', + 'never': 'nie', + 'often': 'oft', + 'sometimes': 'manchmal', + 'seldom': 'selten', + 'once': 'einmal' + } + + # Create a dictionary to store all translations + translations = {} + translations.update(prepositions) + translations.update(conjunctions) + translations.update(articles) + translations.update(auxiliary_verbs) + translations.update(pronouns) + translations.update(adverbs) + + # Replace English closed-class words with German equivalents using regex + def translate_match(match): + word = match.group(0) + translation = translations.get(word, word) + if sidebyside and translation != word: + return f"{word} ({translation})" + return translation + + pattern = re.compile(r'\b(' + '|'.join(re.escape(key) for key in translations.keys()) + r')\b') + translated_text = pattern.sub(translate_match, text) + + return translated_text + + +#------------------------------------------------------------------------------------------------------- + +def TestGradioClientQwen270b(text): + client = Client("Qwen/Qwen2-72B-Instruct") + result = client.predict( + query=text, #"Hello!!", + history=[], + system="You are a helpful assistant.", + api_name="/model_chat" + ) + print(result[1][0]) + print(result[2]) + return result + +#---------------------------------------------------------------------------------------------------------------------- + +def clearfocusreadertext(): + return "", "", "", "" + +def singlefocusreadertext(text): + return f" {text} ", "", "", "" + +def multifocusreadertext(text): + textlength = len(text) + text2 = text[int(textlength * 0.25):] + text[:int(textlength * 0.25)] + text3 = text[int(textlength * 0.5):] + text[:int(textlength * 0.5)] + text4 = text[int(textlength * 0.75):] + text[:int(textlength * 0.75)] + return f" {text} ", f" {text2} ", f" {text3} ", f" {text4} " + +#---------------------------------------------------------------------------------------------------------------------- + +def nllb_chunk_text(text): + # Rough conversion: 1 token ≈ 4 characters + chars_per_token = 4 + chunk_size = 150 * chars_per_token + + # Split the text into chunks of approximately 300 tokens + chunks = textwrap.wrap(text, width=chunk_size) + + # Join the chunks with newline characters + chunked_text = "\n\n".join(chunks) + chunked_text = f"Current Size = {chunk_size} characters \n(Triple click to select a paragraph) \n\n" + chunked_text + + return chunked_text + #-------------------------------------------------------------------------------------------------------------------------------------------- with gr.Blocks() as lliface: #theme=gr.themes.Glass(primary_hue='green', secondary_hue='red', neutral_hue='blue', ) gr.HTML('
Reading comprehension speed through picture based compression (collage), Live Image Subtitles and Listening Comprehension Test - -- Lingua Link (Simple GPT for assistinng image creation) -- |
---- Under Construction: Very Slowly figuring out what AI intergrated interface means (Chat vs Forms vs Function calling vs Sensor + Trigger vs Agent) | How to end copy paste once and for all? ----
All the apis from the below space need to be treated like RAG as notes for the LLM to read before providing its answer
') - with gr.Accordion("Some Useful Spaces", open=False): + with gr.Accordion("Some Useful Spaces (My Bookmarks)", open=False): with gr.Accordion("Translation or STT HF Spaces/Sites (Click Here to Open) - Use to get rough translations", open=False): with gr.Row(): - linktotranslate = gr.Dropdown(choices=["https://hf-audio-whisper-large-v3.hf.space", "https://pyf98-owsm-v3-demo.hf.space", "https://kadirnar-multilingual-translation.hf.space", "https://geonmo-nllb-translation-demo.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) + linktotranslate = gr.Dropdown(choices=["https://rasmus-whisper-youtube-crosslingual-subtitles.hf.space", "https://hf-audio-whisper-large-v3.hf.space", "https://pyf98-owsm-v3-demo.hf.space", "https://kadirnar-multilingual-translation.hf.space", "https://geonmo-nllb-translation-demo.hf.space", "https://facebook-seamless-m4t-v2-large.hf.space", "https://sanchit-gandhi-whisper-jax-diarization.hf.space", "https://sanchit-gandhi-whisper-jax.hf.space", "https://sanchit-gandhi-whisper-large-v2.hf.space", "https://facebook-seamless-m4t.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) translatespacebtn = gr.Button("Use the chosen URL to load interface with a translate model") translatespace = gr.HTML("Translate Space Chosen will load here") translatespacebtn.click(display_website, inputs=linktotranslate, outputs=translatespace) @@ -2244,25 +2527,25 @@ with gr.Blocks() as lliface: #theme=gr.themes.Glass(primary_hue='green', seconda audiogenspacebtn.click(display_website, inputs=linktoaudiogen, outputs=audiogenspace) with gr.Accordion("Image Gen or Animation HF Spaces/Sites (Click Here to Open) - Use with the image placeholder in Workflows tab", open=False): with gr.Row(): - linktoimagegen = gr.Dropdown(choices=["https://gparmar-img2img-turbo-sketch.hf.space", "https://kadirnar-open-sora.hf.space", "https://bytedance-animatediff-lightning.hf.space", "https://ehristoforu-dalle-3-xl-lora-v2.hf.space", "https://multimodalart-cosxl.hf.space", "https://radames-real-time-text-to-image-sdxl-lightning.hf.space", "https://cagliostrolab-animagine-xl-3-1.hf.space", "https://wangfuyun-animatelcm-svd.hf.space" "https://modelscope-transferanything.hf.space", "https://visionmaze-magic-me.hf.space", "https://wangfuyun-animatelcm.hf.space", "https://artgan-diffusion-api.hf.space", "https://multimodalart-stable-cascade.hf.space", "https://ap123-sdxl-lightning.hf.space", "https://google-sdxl.hf.space", "https://guoyww-animatediff.hf.space", "https://segmind-segmind-stable-diffusion.hf.space", "https://simianluo-latent-consistency-model.hf.space", "https://artificialguybr-studio-ghibli-lora-sdxl.hf.space", "https://artificialguybr-pixel-art-generator.hf.space", "https://fffiloni-sdxl-control-loras.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) + linktoimagegen = gr.Dropdown(choices=["https://prodia-sdxl-stable-diffusion-xl.hf.space", "https://prodia-fast-stable-diffusion.hf.space", "https://lllyasviel-ic-light.hf.space", "https://gparmar-img2img-turbo-sketch.hf.space", "https://artificialguybr-artificialguybr-demo-lora.hf.space", "https://kadirnar-open-sora.hf.space", "https://bytedance-animatediff-lightning.hf.space", "https://bytedance-hyper-sdxl-1step-t2i.hf.space", "https://ehristoforu-dalle-3-xl-lora-v2.hf.space", "https://multimodalart-cosxl.hf.space", "https://radames-real-time-text-to-image-sdxl-lightning.hf.space", "https://cagliostrolab-animagine-xl-3-1.hf.space", "https://wangfuyun-animatelcm-svd.hf.space" "https://modelscope-transferanything.hf.space", "https://visionmaze-magic-me.hf.space", "https://wangfuyun-animatelcm.hf.space", "https://artgan-diffusion-api.hf.space", "https://multimodalart-stable-cascade.hf.space", "https://ap123-sdxl-lightning.hf.space", "https://google-sdxl.hf.space", "https://guoyww-animatediff.hf.space", "https://segmind-segmind-stable-diffusion.hf.space", "https://simianluo-latent-consistency-model.hf.space", "https://artificialguybr-studio-ghibli-lora-sdxl.hf.space", "https://artificialguybr-pixel-art-generator.hf.space", "https://fffiloni-sdxl-control-loras.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) imagegenspacebtn = gr.Button("Use the chosen URL to load interface with a chat model") imagegenspace = gr.HTML("Chat Space Chosen will load here") imagegenspacebtn.click(display_website, inputs=linktoimagegen, outputs=imagegenspace) with gr.Accordion("3D Model Spaces/Sites (Click Here to Open) - Image to Blender?", open=False): with gr.Row(): - linktoThreedModel = gr.Dropdown(choices=["https://ashawkey-lgm.hf.space", "https://dylanebert-lgm-mini.hf.space", "https://dylanebert-splat-to-mesh.hf.space", "https://dylanebert-multi-view-diffusion.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) + linktoThreedModel = gr.Dropdown(choices=["https://tencentarc-instantmesh.hf.space", "https://ashawkey-lgm.hf.space", "https://dylanebert-lgm-mini.hf.space", "https://dylanebert-splat-to-mesh.hf.space", "https://dylanebert-multi-view-diffusion.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) ThreedModelspacebtn = gr.Button("Use the chosen URL to load interface with a translate model") ThreedModelspace = gr.HTML("Translate Space Chosen will load here") ThreedModelspacebtn.click(display_website, inputs=linktoThreedModel, outputs=ThreedModelspace) with gr.Accordion("Image Understanding/Vision Conversation HF Spaces/Sites (Click Here to Open)", open=False): with gr.Row(): - linktovisionund = gr.Dropdown(choices=["https://linfanluntan-grounded-sam.hf.space", "https://merve-llava-next.hf.space", "https://badayvedat-llava.hf.space", "https://otter-ai-otterhd-demo.hf.space", "https://adept-fuyu-8b-demo.hf.space", "https://xinyu1205-recognize-anything.hf.space", "https://languagebind-moe-llava.hf.space", "https://vision-cair-minigpt4.hf.space", "https://fffiloni-live-vision.hf.space", "https://ysharma-gemini-pro-vision-chat.hf.space", "https://kvikontent-chatgpt-vision.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) + linktovisionund = gr.Dropdown(choices=["https://google-paligemma-hf.hf.space", "https://kingnish-gpt-4o.hf.space", "https://linfanluntan-grounded-sam.hf.space", "https://merve-llava-next.hf.space", "https://badayvedat-llava.hf.space", "https://otter-ai-otterhd-demo.hf.space", "https://adept-fuyu-8b-demo.hf.space", "https://xinyu1205-recognize-anything.hf.space", "https://languagebind-moe-llava.hf.space", "https://vision-cair-minigpt4.hf.space", "https://fffiloni-live-vision.hf.space", "https://ysharma-gemini-pro-vision-chat.hf.space", "https://kvikontent-chatgpt-vision.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) visionundspacebtn = gr.Button("Use the chosen URL to load interface with a chat model") visionundspace = gr.HTML("Chat Space Chosen will load here") visionundspacebtn.click(display_website, inputs=linktovisionund, outputs=visionundspace) with gr.Accordion("LLM HF Spaces/Sites (Click Here to Open) - Use 'Acronym Map Creation Space' Tab with this - Ask for Translation of image tags made below, sentence to emojis, Wordlists, Test Conversations, Get Grammar Explanations etc., Can use GPT-4 or new SOTA to review the conversation", open=False): with gr.Row(): - linktochat = gr.Dropdown(choices=["https://sdk.vercel.ai/docs", "https://labs.perplexity.ai/", "https://chat.lmsys.org", "https://cyzgab-catch-me-if-you-can.hf.space", "https://qwen-qwen1-5-110b-chat-demo.hf.space", "https://ysharma-chat-with-meta-llama3-8b.hf.space", "https://databricks-dbrx-instruct.hf.space", "https://cohereforai-c4ai-command-r-plus.hf.space", "https://qwen-qwen1-5-moe-a2-7b-chat-demo.hf.space", "https://cohereforai-c4ai-command-r-v01.hf.space", "https://ehristoforu-mixtral-46-7b-chat.hf.space", "https://stabilityai-stablelm-2-1-6b-zephyr.hf.space", "https://qwen-qwen1-5-72b-chat.hf.space", "https://deepseek-ai-deepseek-coder-7b-instruct.hf.space", "https://01-ai-yi-34b-chat.hf.space", "https://ysharma-zephyr-playground.hf.space", "https://huggingfaceh4-zephyr-chat.hf.space", "https://osanseviero-mistral-super-fast.hf.space", "https://artificialguybr-qwen-14b-chat-demo.hf.space", "https://huggingface-projects-llama-2-7b-chat.hf.space", "https://ysharma-explore-llamav2-with-tgi.hf.space", "https://mosaicml-mpt-30b-chat.hf.space", "https://huggingfaceh4-falcon-chat.hf.space", "https://uwnlp-guanaco-playground-tgi.hf.space", "https://stabilityai-stablelm-tuned-alpha-chat.hf.space", "https://mosaicml-mpt-7b-storywriter.hf.space", "https://huggingfaceh4-starchat-playground.hf.space", "https://bigcode-bigcode-playground.hf.space", "https://mosaicml-mpt-7b-chat.hf.space", "https://huggingchat-chat-ui.hf.space", "https://togethercomputer-openchatkit.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) + linktochat = gr.Dropdown(choices=["https://labs.perplexity.ai/", "https://chat.lmsys.org", "https://sdk.vercel.ai/docs", "https://qwen-qwen-max-0428.hf.space", "https://cohereforai-c4ai-command-r-plus.hf.space", "https://huggingface.co/spaces/eswardivi/Phi-3-mini-128k-instruct", "https://eswardivi-phi-3-mini-4k-instruct.hf.space", "https://cyzgab-catch-me-if-you-can.hf.space", "https://snowflake-snowflake-arctic-st-demo.hf.space", "https://qwen-qwen1-5-110b-chat-demo.hf.space", "https://ysharma-chat-with-meta-llama3-8b.hf.space", "https://databricks-dbrx-instruct.hf.space", "https://qwen-qwen1-5-moe-a2-7b-chat-demo.hf.space", "https://cohereforai-c4ai-command-r-v01.hf.space", "https://ehristoforu-mixtral-46-7b-chat.hf.space", "https://stabilityai-stablelm-2-1-6b-zephyr.hf.space", "https://qwen-qwen1-5-72b-chat.hf.space", "https://deepseek-ai-deepseek-coder-7b-instruct.hf.space", "https://01-ai-yi-34b-chat.hf.space", "https://ysharma-zephyr-playground.hf.space", "https://huggingfaceh4-zephyr-chat.hf.space", "https://osanseviero-mistral-super-fast.hf.space", "https://artificialguybr-qwen-14b-chat-demo.hf.space", "https://huggingface-projects-llama-2-7b-chat.hf.space", "https://ysharma-explore-llamav2-with-tgi.hf.space", "https://mosaicml-mpt-30b-chat.hf.space", "https://huggingfaceh4-falcon-chat.hf.space", "https://uwnlp-guanaco-playground-tgi.hf.space", "https://stabilityai-stablelm-tuned-alpha-chat.hf.space", "https://mosaicml-mpt-7b-storywriter.hf.space", "https://huggingfaceh4-starchat-playground.hf.space", "https://bigcode-bigcode-playground.hf.space", "https://mosaicml-mpt-7b-chat.hf.space", "https://huggingchat-chat-ui.hf.space", "https://togethercomputer-openchatkit.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True) chatspacebtn = gr.Button("Use the chosen URL to load interface with a chat model. For sdk.vercel click the chat button on the top left. For lymsys / chat arena copy the link and use a new tab") with gr.Accordion("Some prompt ideas", open=False): with gr.Accordion("Prompts in text (Manual copy paste)", open=False): @@ -2276,14 +2559,13 @@ with gr.Blocks() as lliface: #theme=gr.themes.Glass(primary_hue='green', seconda chatspace = gr.HTML("Chat Space Chosen will load here") chatspacebtn.click(display_website, inputs=linktochat, outputs=chatspace) #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- with gr.Row(): with gr.Column(scale=1): - gr.HTML("""
Some useful links
-- Opensource List -- | -- Open LLM Leaderboard -- | -- Openxlabs - Huggingface Alternative -- | -- Whisper JAX -- | -- Google Translate -- | -- Modelscope Text to Video -- | -- stable-diffusion 2 -- | -- stable-diffusion 1 -- | -- karlo 1 -- | -- Bark (TTS) -- | -- Offline Text Model Demos -- | -- SAM with Clip -- | -- Eleven Labs -- | -- Animate an Image -- | -- Clone a voice -- | -- OpenAI pricing -- | -- Image Training Data Search -- | -- Huggingface Chat -- | -- 128x128 Stable Diffusion (Fast) -- | -- Search 95 million research abstracts -- | -- Tiny Stories Dataset -- | -- Visualglm6b - Discuss images -- | -- RAM and Tag2Text -- | -- Potat1 Text2vid -- | -- Alexandria Prohect (Will Deque) - Free Embeddings -- | -- Google Arts and Culture Portal -- | -- Word Level Timestamps -- | -- NLLB 600M Demo -- = -- NLLB Github -- | -- Zeroscope v2 Text to video -- | -- ComfyUI Text to Image -- | -- Deepfloyd IF - Text in image -- | -- ChatGPT Custom Plugins Test Space -- | -- r/LocalLlama -- | -- r/Singularity -- | -- SD-XL Test Space -- | -- Seamless M4T - Translation one stop shop -- | -- Code Llama playground -- | -- Text to sing -- | -- Stable Diffusion Webui (Camenduru Space) -- | -- Wizard Coder 34B -- | -- Cowrite with llama2 -- | -- Image to Story -- | -- Clip interrogator 2 -- | -- Agent Benchmarks -- | -- AI Town Live Demo -- = -- AI Town Repository (Deployment]) -- | -- Generative Agents: Interactive Simulacra of Human Behavior (Research paper Repository) -- | -- IDEFICS - open Multimodal model -- | -- Belebele (Meta Dataset) -- | -- AI Comic Factory -- | -- CAMENDURU REPOS -- | -- SQL Dataset - A list of simple questions -- | -- Open Interpreter (alt to ChatGPT Pro) -- | -- List - Easy with AI -- | -- Whisper Web (UI) -- | -- Roblox Assistant -- | -- Illusion Diffusion (Hide words or shapes in the image) -- | -- Background replacement - Shopify -- | -- Lora The Explorer (SDXL) -- | -- InstaFlow (Under 1 second Inference) -- | -- TinyStories on mojo (230+ tk/s) -- | -- Any Emoji you want - emojijs -- | -- SDXL on TPUv5 -- | -- LCM - SD1.5 at 7secs per 4 images (after coldstart) -- | -- SDXL Control Lora -- | -- Whisper WebUI -- | -- AnimateDiff: Create an image make a video -- | -- Seamless m4t v2 -- | -- OtterHD: Multimodal model -- | -- Ego-exo4d Multimodal dataset -- | -- Meta Imagine images (Free) -- | -- Mage Space images (Free) -- | -- Bing Image Creator (Free) -- | -- Jay Alammar Blog - Illustrated Transformer, Stable Diffusion and More -- | -- OpenVoice - Open Source Voice Clone -- | -- Live-Vision HF Space - Live commentary on a video feed demo -- | -- Transformers JS demo - Xenova (HF) -- | -- Huggingface Assistants -- | -- 4-step SDXL Inference through LORA -- | -- Cosmopedia - 92 GB synthetic dataset made using Mixtral (25 billion tokens) -- | -- LGM-mini: image to ply -- | -- Playground v2.5 -- | -- OpenAI - Transformer Debugger -- | -- SWE-bench dataset (Real world github issues) -- | -- The Era of 1-bit LLMs - All Large Language Models are in 1.58 Bits -- | -- Microsoft Repo for AI research (Bitnet andd others will be here) -- | -- Realtime response using GroqCloud and live gradio interface -- | -- GroqCloud Application showcase -- | -- Open version of Open AI SORA -- | -- MMS (Meta) - TTS for 1000 languages -- | -- VoiceCraft (Audio Clone Model) -- | -- QuietStar Paper (HF) - Models linked -- | -- JAMBA - mamba based 52B with 140K context on one gpu!! -- | -- SDXS for realtime generation (upto 100FPS) -- | -- gguf-my-repo: HF space to create ggufs -- | -- LLAMA 3 release page (8, 70 and 400+) -- | -
""") + gr.HTML("""
Some useful links
-- Gradio Playground - Debug UI Fast -- | -- Opensource List -- | -- Open LLM Leaderboard -- | -- Openxlabs - Huggingface Alternative -- | -- Whisper JAX -- | -- Google Translate -- | -- Modelscope Text to Video -- | -- stable-diffusion 2 -- | -- stable-diffusion 1 -- | -- karlo 1 -- | -- Bark (TTS) -- | -- Offline Text Model Demos -- | -- SAM with Clip -- | -- Eleven Labs -- | -- Animate an Image -- | -- Clone a voice -- | -- OpenAI pricing -- | -- Image Training Data Search -- | -- Huggingface Chat -- | -- 128x128 Stable Diffusion (Fast) -- | -- Search 95 million research abstracts -- | -- Tiny Stories Dataset -- | -- Visualglm6b - Discuss images -- | -- RAM and Tag2Text -- | -- Potat1 Text2vid -- | -- Alexandria Prohect (Will Deque) - Free Embeddings -- | -- Google Arts and Culture Portal -- | -- Word Level Timestamps -- | -- NLLB 600M Demo -- = -- NLLB Github -- | -- Zeroscope v2 Text to video -- | -- ComfyUI Text to Image -- | -- Deepfloyd IF - Text in image -- | -- ChatGPT Custom Plugins Test Space -- | -- r/LocalLlama -- | -- r/Singularity -- | -- SD-XL Test Space -- | -- Seamless M4T - Translation one stop shop -- | -- Code Llama playground -- | -- Text to sing -- | -- Stable Diffusion Webui (Camenduru Space) -- | -- Wizard Coder 34B -- | -- Cowrite with llama2 -- | -- Image to Story -- | -- Clip interrogator 2 -- | -- Agent Benchmarks -- | -- AI Town Live Demo -- = -- AI Town Repository (Deployment]) -- | -- Generative Agents: Interactive Simulacra of Human Behavior (Research paper Repository) -- | -- IDEFICS - open Multimodal model -- | -- Belebele (Meta Dataset) -- | -- AI Comic Factory -- | -- CAMENDURU REPOS -- | -- SQL Dataset - A list of simple questions -- | -- Open Interpreter (alt to ChatGPT Pro) -- | -- List - Easy with AI -- | -- Whisper Web (UI) -- | -- Roblox Assistant -- | -- Illusion Diffusion (Hide words or shapes in the image) -- | -- Background replacement - Shopify -- | -- Lora The Explorer (SDXL) -- | -- InstaFlow (Under 1 second Inference) -- | -- TinyStories on mojo (230+ tk/s) -- | -- Any Emoji you want - emojijs -- | -- SDXL on TPUv5 -- | -- LCM - SD1.5 at 7secs per 4 images (after coldstart) -- | -- SDXL Control Lora -- | -- Whisper WebUI -- | -- AnimateDiff: Create an image make a video -- | -- Seamless m4t v2 -- | -- OtterHD: Multimodal model -- | -- Ego-exo4d Multimodal dataset -- | -- Meta Imagine images (Free) -- | -- Mage Space images (Free) -- | -- Bing Image Creator (Free) -- | -- Jay Alammar Blog - Illustrated Transformer, Stable Diffusion and More -- | -- OpenVoice - Open Source Voice Clone -- | -- Live-Vision HF Space - Live commentary on a video feed demo -- | -- Transformers JS demo - Xenova (HF) -- | -- Huggingface Assistants -- | -- 4-step SDXL Inference through LORA -- | -- Cosmopedia - 92 GB synthetic dataset made using Mixtral (25 billion tokens) -- | -- LGM-mini: image to ply -- | -- Playground v2.5 -- | -- OpenAI - Transformer Debugger -- | -- SWE-bench dataset (Real world github issues) -- | -- The Era of 1-bit LLMs - All Large Language Models are in 1.58 Bits -- | -- Microsoft Repo for AI research (Bitnet andd others will be here) -- | -- Realtime response using GroqCloud and live gradio interface -- | -- GroqCloud Application showcase -- | -- Open version of Open AI SORA -- | -- MMS (Meta) - TTS for 1000 languages -- | -- VoiceCraft (Audio Clone Model) -- | -- QuietStar Paper (HF) - Models linked -- | -- JAMBA - mamba based 52B with 140K context on one gpu!! -- | -- SDXS for realtime generation (upto 100FPS) -- | -- gguf-my-repo: HF space to create ggufs -- | -- LLAMA 3 release page (8, 70 and 400+) -- | + -- AI Town running in HF -- | -- Nvidia AI Playground -- | -- Nemotron 4 340b - synthetic data generation assist -- | -- Huggingface Collections -- | -- Stable Diffusion 3 release -- | -- UDIO AI text to song generation -- | -- Lumalabs Video text to generation -- | -- OpenAI Interpretability (May/June 24) -- | -- OpenAI Sparse Autoencoder Repo -- | -- Anthropic Interpretability Posts Thread -- | -- Golden Gate Claude -- | -- Kling AI - SORA Competitor -- |
""") with gr.Tabs() as nav1: with gr.Tab("Rep - HTML"): - gr.HTML("UNWFWO = Unknown Native Word Foreign Word Order i.e. during active listening practice you only need the words you dont know") + gr.HTML("UNWFWO = Unknown Native Word Foreign Word Order i.e. during active listening practice you only need the words you dont know | Closed Eye Recital per new word | 1 new word a minute while recycling the words from the previous minutes") gr.HTML("""""") with gr.Tab("Rep - Gradio"): @@ -2295,7 +2577,7 @@ with gr.Blocks() as lliface: #theme=gr.themes.Glass(primary_hue='green', seconda PracticeExposurebtn = gr.Button("Change Default") #Button CLick is defined under the variable it needs to manipulate to avoid undefined error gr.Button("Tab Navigation").click(TabNavigation, inputs=None, outputs=[nav1]) with gr.Tab("Words Lists"): - gr.HTML("Stop, Sight(Dolch) and other Wordlists") + gr.HTML("All links above can be turned into a glossary and then translated

Stop, Sight(Dolch) and other Wordlists") gr.HTML("Wikipeadia
Basic: -- Dolch (Sight) Words -- |
Advanced: -- Blend Word -- | -- List_of_portmanteaus -- | ") gr.HTML("Reddit
-- Wordplay -- | ") gr.HTML("Language Tests
") @@ -2317,16 +2599,84 @@ with gr.Blocks() as lliface: #theme=gr.themes.Glass(primary_hue='green', seconda #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- with gr.Column(scale=3): - with gr.Tab("General Idea"): - gr.HTML("FINAL VERSION = Image placeholder + Merged Images + Side by Side Audio + UNWFWO Reader script + Spotify/Youtube integration in one interface
True mastery is from the relations between each item aka how every word relates to each other - Repitition in the form combinatorics - llm turns these into full sentences / ideas ") - gr.HTML("Focus = Thinking = Audio = Repitition = This space is just ideas for optimising the audio content. - Audio of side by side version -- listen till you can say the foreign before the audio plays it (Knowledge version is Glossary as vocab you must mastering before reading)") - with gr.Accordion("Some Current Incomplete Tests", open=False): - # with gr.Group(): - # gr.HTML("Stable LM 2 zephyr 1.6 Placeholder - llama-cpp-python issues locally") #Seperate space tested - # gr.Interface(fn=lambda name: f"Placeholder to talk to Stable LM. Prompt = {name}", inputs="text", outputs="text") - # gr.Interface(fn=whisperlocaltts, inputs="file", outputs="text", description="Incomplete - Whisper base Test - Can record and then copy the text for use") #Seperate space tested - gr.HTML('Memorisation by string comparison idea

Result of prompt chain starting with: Lets say I have the strings "red" and "ppalgan" how can I guess the second from the first from just spelling (eg. similar words and distance in the alphabet, ...), how can I use python to do this i.e. output of no matching letters, closest letter to r, then e, then d, a dictionary of letters that look similar eg. d and p, l and I a and d etc.') - gr.Interface(fn=letterbased_guess_word, inputs=["text", "text"], outputs="text", description="letter based guess suggestions (one word to one word is the designed use case)") + with gr.Tab("General Idea"): + gr.HTML("Side by side reading creator (NLLB-600M (+-3gb / setting has 400 tokens? as max length for inference optimisation?)- 200 languages vs 107 in googletrans) - -- Fairseq Github -- | inspired by - -- Geonmo NLLB Demo -- | -- Vutuka demo -- ") + with gr.Accordion("Chunk assist to avoid errors in nllb600m"): + gr.Interface(fn=nllb_chunk_text, inputs=gr.Textbox(lines=5, placeholder="Enter your text here..."), outputs="text", title="Text Chunker", description="Enter your text and chunk it into segments of approximately 300 tokens.") + with gr.Group(): + gr.HTML("Under Construction - generator and cpu based to beat gpu cost, cpu wait time and network dependency for local use") + nllbtranscpuinput = gr.Text(label="Paste Text you want to learn here (wordlists and UDHR can be used as )", placeholder="Enter Text Here") + with gr.Row(): + nllbtranscpubtnword4word = gr.Button("Create Side by Side Translation (FWNWO)") + nllbtranscpulangsrc = gr.Dropdown(choices=nllb_lang_codes, label="Choose source language", value="English") + nllbtranscpulangdest = gr.Dropdown(choices=nllb_lang_codes, label="Choose target language", value="Akan") + #nllbtranscpuword4word = gr.Checkbox(label="word for word?") + nllbtranscpubtn = gr.Button("Create Whole Translation (FWFWO)") + gr.HTML("Placeholder for render function to auto load dropdown with chunks as input - Split by newline or spacy") + with gr.Row(): + with gr.Column(): #scale=4 + nllbtranscpudetailsword4wordOutput = gr.Text(label="Side by side Inference Details", placeholder="Side by side Inference Details will display here") + nllbtranscpuOutputword4word = gr.Text(label="Side by side", placeholder="Side by side will display here") + nllbtranscpuaudioreadyformat = gr.Text(label="Audio ready format", placeholder="copy output to TTS to have listening practice material") + with gr.Column(): + nllbtranscpudetailsOutput = gr.Text(label="Inference Details", placeholder="Details will display here") + nllbtranscpuOutput = gr.Text(label="Whole Translation of text", placeholder="Whole Translation will display here") + with gr.Row(): + with gr.Column(scale=2): + nllbtranscpureversetranslationOutputword4word = gr.Text(label="Whole Translation of text", placeholder="Whole Translation to word for word will display here") + with gr.Column(scale=1): + nllbtranscpureversetranslationbtnword4word = gr.Button("Create Whole Translation side by side (NWFWO)") + nllbtranscputotalhistoryOutput = gr.Text(placeholder="History nllb translations during this session should remain here") + nllbtransrenderorderpracticePlaceholder = gr.HTML("Placeholder for render for practice without display format problems
") + nllbtranscpuaudiomerged = gr.HTML("Code to save interleaved audio using two languages and save to single file
") + nllbtranscpubtnword4word.click(fn=nllbtransctranslationoptionalw4w, inputs=[nllbtranscpulangsrc, nllbtranscpulangdest, nllbtranscpuinput], outputs=[nllbtranscpuOutputword4word, nllbtranscpudetailsword4wordOutput, nllbtranscputotalhistoryOutput]) + nllbtranscpureversetranslationbtnword4word.click(fn=nllbtransctranslationoptionalw4w, inputs=[nllbtranscpulangdest, nllbtranscpulangsrc, nllbtranscpuOutput], outputs=[nllbtranscpureversetranslationOutputword4word, nllbtranscpudetailsword4wordOutput, nllbtranscputotalhistoryOutput]) + nllbtranscpubtn.click(fn=nllbtransctranslation, inputs=[nllbtranscpulangsrc, nllbtranscpulangdest, nllbtranscpuinput], outputs=[nllbtranscpuOutput, nllbtranscpudetailsOutput, nllbtranscputotalhistoryOutput]) + nllbtranscpuinput_text = gr.Textbox(label="Paste FWFWO or NWFWO to practice FWO") + + # Define a function with the @gr.render decorator + @gr.render(inputs=nllbtranscpuinput_text) + def nllbtrans_randomize_text(text): + global nllbtrans_original_order + words = text.split() + if len(words) == 0: + gr.Markdown("## No Input Provided") + return [], [], [] + + nllbtrans_original_order = list(range(1, len(words) + 1)) + random.shuffle(words) + + dropdowns = [] + for word in words: + dropdown = gr.Dropdown(choices=nllbtrans_original_order, label=word) + dropdowns.append(dropdown) + + # columns = [] + # for i in range(0, len(dropdowns), 10): + # groupedcolumns = [] + # for dropdown in dropdowns[i:i+10]: + # groupedcolumns.append(gr.Column(dropdown)) + # print(groupedcolumns) + # columns.append(gr.Row(groupedcolumns)) #, equal_height=True))) + # print(columns) + + columns = [] + for i in range(0, len(dropdowns), 10): + row_dropdowns = dropdowns[i:i+10] + row = gr.Row() + with row: + for dropdown in row_dropdowns: + gr.Column(dropdown) + columns.append(row) + + # Check button to check the order + check_button = gr.Button("Check Order") + result = gr.Markdown("## Result will be shown here") + + check_button.click(nllbtrans_check_order, inputs=dropdowns, outputs=result) + + return columns + [check_button, result] + gr.HTML("Side by side reading creator (Google Translate) TODO - Roman output of Non roman characters") with gr.Group(): with gr.Row(): @@ -2355,358 +2705,128 @@ with gr.Blocks() as lliface: #theme=gr.themes.Glass(primary_hue='green', seconda w4wsidebysideRandomisedOutput = gr.Text(label="Random Order As Test", placeholder="Randomised version (Transition Tab most left bottom) will display here") w4wsidebysideQueGenOutput = gr.Text(label="Questions generation as comprehension test", placeholder="Questions generated will display here") w4wsidebysideUNWFWOOutput = gr.Text(label="HTML as UNWFWO assistant", placeholder="HTML as UNWFWO assistant download will display here") - gr.HTML("Side by side reading creator (NLLB-600M (+-3gb / setting has 400 tokens? as max length for inference optimisation?)- 200 languages vs 107 in googletrans) - -- Fairseq Github -- | inspired by - -- Geonmo NLLB Demo -- | -- Vutuka demo -- ") - with gr.Group(): - gr.HTML("Under Construction - generator and cpu based to beat gpu cost, cpu wait time and network dependency for local use") - nllbtranscpuinput = gr.Text(label="Paste Text you want to learn here (wordlists and UDHR can be used as )", placeholder="Enter Text Here") - with gr.Row(): - nllbtranscpubtnword4word = gr.Button("Create Side by Side Translation") - nllbtranscpulangsrc = gr.Dropdown(choices=nllb_lang_codes, label="Choose source language", value="English") - nllbtranscpulangdest = gr.Dropdown(choices=nllb_lang_codes, label="Choose target language", value="Akan") - #nllbtranscpuword4word = gr.Checkbox(label="word for word?") - nllbtranscpubtn = gr.Button("Create Whole Translation (FWFWO)") - with gr.Row(): - with gr.Column(): #scale=4 - nllbtranscpudetailsword4wordOutput = gr.Text(label="Side by side Inference Details", placeholder="Side by side Inference Details will display here") - nllbtranscpuOutputword4word = gr.Text(label="Side by side", placeholder="Side by side will display here") - with gr.Column(): - nllbtranscpudetailsOutput = gr.Text(label="Inference Details", placeholder="Details will display here") - nllbtranscpuOutput = gr.Text(label="Whole Translation of text", placeholder="Whole Translation will display here") - nllbtranscpubtnword4word.click(fn=nllbtransctranslationoptionalw4w, inputs=[nllbtranscpulangsrc, nllbtranscpulangdest, nllbtranscpuinput], outputs=[nllbtranscpuOutputword4word, nllbtranscpudetailsword4wordOutput]) - nllbtranscpubtn.click(fn=nllbtransctranslation, inputs=[nllbtranscpulangsrc, nllbtranscpulangdest, nllbtranscpuinput], outputs=[nllbtranscpuOutput, nllbtranscpudetailsOutput]) - gr.Interface(fn=LoadNLTKUDHRText, inputs=NLTKudhr, outputs=["text", "textarea"], description="UDHR as some test texts") - with gr.Tab("Beginner - Listen + Read"): - gr.Label("Closed Eye Recital per new word | 1 new word a minute while recycling the words from the previous minutes") - with gr.Row(): - with gr.Column(scale=1): - gr.HTML("Listening - Songs - Chorus
Anticipation of the item to remember is how you learn lyrics that is why songs are easy as if you heard it 10 times already your capacity to anticipate the words is great

This is where TTS helps as you are ignoring all words except the words just before the actual
Tiny Stories dataset is like a graded reader
") - gr.Interface(fn=TTSforListeningPractice, inputs=["text", TTSLangOptions, "checkbox"], outputs="audio", description="Paste chorus lyrics from below here and use TTS or make notes to save here (Or paste anything)") - with gr.Accordion("TTS Spaces", open=False): - TTSspaceoptions = gr.Dropdown(choices=["https://facebook-seamless-m4t-v2-large.hf.space", "https://mms-meta-mms.hf.space", "https://suno-bark.hf.space", "https://coqui-xtts.hf.space"], label="existing whisper spaces") - TTSspaceoptionsbtn = gr.Button("Load a Image as prompt Space") - TTSspaceoptionsOut = gr.HTML() - TTSspaceoptionsbtn.click(fn=display_website, inputs=TTSspaceoptions, outputs=TTSspaceoptionsOut) - gr.HTML("

Fastest way to learn words = is to have your own sound reference --> probably why babies learn fast as they make random noise

If you know the flow of the song you can remember the spelling easier

Essentially if the sounds are repeated or long notes they are easy to remember

") - gr.Interface(fn=AutoChorusInvestigator, inputs="text", outputs="text", description="Paste Full Lyrics to try find only chorus lines") - gr.Interface(fn=AutoChorusPerWordScheduler, inputs="text", outputs="text", description="Create order of repitition for tts practice") - with gr.Column(scale=1): - gr.HTML("""Reading - Caption images (SD/Dalle-E)
-- Unsplash - free images -- | --Huggingface CLIP-Interrogator Space-- | -- Clip interrogator 2 -- | -- Tag2Text is faster than clip -- |
-- Transform word to an image -- | -- Promptist (Microsoft) -- | -- RAM and Tag2Text -- | -- SAM with Clip -- """) - with gr.Accordion("RAM/Tag2Text Space - Create Tags here and Copy paste", open=False): - RAMSpaceLink = gr.Textbox("https://xinyu1205-recognize-anything.hf.space") - RAMSpacetest = gr.HTML("") - RAMSpacetestbtn = gr.Button('Load Space') - RAMSpacetestbtn.click(display_website, RAMSpaceLink, RAMSpacetest) - with gr.Accordion("Grounded SAM Space Test", open=False): - SAMSpaceLink = gr.Textbox("https://linfanluntan-grounded-sam.hf.space") - SAMSpacetest = gr.HTML("") - SAMSpacetestbtn = gr.Button('Load Space') - SAMSpacetestbtn.click(display_website, SAMSpaceLink, SAMSpacetest) - gr.HTML("Use Shift Enter To put text on new lines if the text doesnt fit
if theres an error you have to remove the foreign letters and place roman ones") - gr.Interface(fn=add_text_to_image , inputs=["image", "text"], outputs="image", description="Create Annotated images (Can create using stable diffusion and use the prompt) - Describe from one side to the other to make guessing easy") - with gr.Tab("Sentence Builder"): - gr.HTML("Claude 3 assited ideas and code") - with gr.Tab("Basic Sentence Builder"): - with gr.Tab("SVO"): - gr.Markdown( - """ - ## Subject-Verb-Object (SVO) Order - - Some languages that follow the SVO order: - - English - - Spanish - - French - - Italian - - Chinese - """ - ) - svo_subject = gr.Dropdown(sentbuildsubjects, label="Subject") - svo_verb = gr.Dropdown(sentbuildverbs, label="Verb") - svo_object = gr.Dropdown(sentbuildobjects, label="Object") - svo_output = gr.Textbox(label="Sentence (SVO)") - svo_btn = gr.Button("Generate SVO Sentence") - svo_btn.click(build_sentence_basic, inputs=[svo_subject, svo_verb, svo_object, gr.State("SVO")], outputs=svo_output) - - with gr.Tab("SOV"): - gr.Markdown( - """ - ## Subject-Object-Verb (SOV) Order - - Some languages that follow the SOV order: - - Japanese - - Korean - - Turkish - - Hindi - - Latin - """ - ) - sov_subject = gr.Dropdown(sentbuildsubjects, label="Subject") - sov_object = gr.Dropdown(sentbuildobjects, label="Object") - sov_verb = gr.Dropdown(sentbuildverbs, label="Verb") - sov_output = gr.Textbox(label="Sentence (SOV)") - sov_btn = gr.Button("Generate SOV Sentence") - sov_btn.click(build_sentence_basic, inputs=[sov_subject, sov_verb, sov_object, gr.State("SOV")], outputs=sov_output) - - with gr.Tab("VSO"): - gr.Markdown( - """ - ## Verb-Subject-Object (VSO) Order - - Some languages that follow the VSO order: - - Arabic - - Hebrew - - Irish - - Welsh - - Samoan - """ - ) - vso_verb = gr.Dropdown(sentbuildverbs, label="Verb") - vso_subject = gr.Dropdown(sentbuildsubjects, label="Subject") - vso_object = gr.Dropdown(sentbuildobjects, label="Object") - vso_output = gr.Textbox(label="Sentence (VSO)") - vso_btn = gr.Button("Generate VSO Sentence") - vso_btn.click(build_sentence_basic, inputs=[vso_subject, vso_verb, vso_object, gr.State("VSO")], outputs=vso_output) - - with gr.Tab("Complex Sentence Builder"): - gr.Markdown( - """ - ## Complex Sentence Builder - - Create intricate sentences using various grammatical components. - """ - ) - complex_subject = gr.Dropdown(sentbuildsubjects, label="Subject") - complex_verb = gr.Dropdown(sentbuildverbs, label="Verb") - complex_object = gr.Dropdown(sentbuildobjects, label="Object") - complex_adjective = gr.Dropdown(sentbuildadjectives, label="Adjective") - complex_adverb = gr.Dropdown(sentbuildadverbs, label="Adverb") - complex_prep_phrase = gr.Dropdown(sentbuildprep_phrases, label="Prepositional Phrase") - complex_conjunction = gr.Dropdown(sentbuildconjunctions, label="Conjunction") - complex_structure = gr.Radio(sentbuildchoices, label="Structure") - complex_output = gr.Textbox(label="Complex Sentence") - complex_btn = gr.Button("Generate Complex Sentence") - complex_btn.click(build_sentence, inputs=[complex_subject, complex_verb, complex_object, complex_adjective, complex_adverb, complex_prep_phrase, complex_conjunction, complex_structure], outputs=complex_output) - - with gr.Tab("Quiz"): - # ... (Quiz tab remains the same) - gr.Markdown( - """ - ## Sentence Order Quiz - - Test your knowledge of sentence orders by identifying the correct order for each given sentence. - """ - ) - quiz_sentence = gr.Textbox(label="Sentence") - quiz_question = gr.Textbox(label="Question") - quiz_choices = gr.Radio(["SVO", "SOV", "VSO"], label="Options") - quiz_answer = gr.Textbox(label="Answer") - quiz_feedback = gr.Textbox(label="Feedback") - - quiz_button = gr.Button("Generate Quiz Question") - quiz_button.click(sentbuildgenerate_quiz_question, inputs=[], outputs=[quiz_sentence, quiz_question, quiz_choices, quiz_answer]) - - submit_button = gr.Button("Submit Answer") - submit_button.click(sentbuildcheck_answer, inputs=[quiz_choices, quiz_answer], outputs=[quiz_feedback, submit_button]) - with gr.Tab("Youtube Subs Listening Comprehension"): - gr.HTML("State Management Solution for Word --> Find LingQ Here --> https://www.lingq.com/en/") - with gr.Tab("Prepocessed Subtitles Practice"): - gr.HTML("Custom SD script to create image for for each noun/ verb/ etc. - ") + with gr.Tab("Reading and Grammar Assistance"): + gr.HTML("Under time pressure (foreign text takes very long) the chance of just scanning the text goes up, below assists with reading the current line") + with gr.Tab("General - Notetaking Reader"): + gr.HTML("Placeholder for render based reader - Still incomplete as the inputs need to be stored as seperate items to allow sending output to the right place") + gr.HTML("Ideas to add back to the general reader
Analytics - count the length of the text in the note fields
Add a maslows hierachy textbox
critical thinking texbox
add a chunk reference field
Code to fit the theme
Words in songs / youtube videos you have collected to one file") + gr.HTML("Placeholder for the rake interface") + autoprocessrender_pdf_input = gr.File(label="Upload PDF", type="filepath") + autoprocessrender_text_input = gr.Textbox(label="Paste Text Here", lines=10) + autoprocessrender_text_file_input = gr.File(label="Upload Text File", type="filepath") + autoprocessrender_chunks_output = gr.Markdown(label="Chunks will be displayed here") + + @gr.render(inputs=[autoprocessrender_pdf_input, autoprocessrender_text_input, autoprocessrender_text_file_input]) + def autoprocessrender_display_chunks(pdf_file=None, pasted_text=None, text_file=None): + chunks = [] + if pdf_file: + chunks = autoprocessrender_handle_pdf(pdf_file.name) + elif pasted_text: + chunks = autoprocessrender_split_text_into_chunks(pasted_text) + elif text_file: + chunks = autoprocessrender_handle_text_file(text_file) + + notes = [] + ai_notes = [] + if not chunks: + return gr.Markdown("## No text provided or extracted"), [], [], [] + else: + chunk_elements = [] + for chunk in chunks: + chunk_textbox = gr.Textbox(value=chunk, label="Chunk", interactive=False) + chunk_pos_html = gr.HTML(value=chunk, label="Chunk POS") + notes_textbox = gr.Textbox(label="Notes") + words_ending_in_s = autoprocessrender_find_words_ending_in_s(chunk) + words_textbox = gr.Textbox(value=", ".join(words_ending_in_s), label="Words ending in 's'", interactive=False) + ai_notes_textbox = gr.Textbox(label="AI Notes") + + def add_ai_notes(chunk=chunk, ai_notes_textbox=ai_notes_textbox): + ai_notes = autoprocessrender_generate_ai_notes(chunk) + ai_notes_textbox.update(value=ai_notes) + return ai_notes + + ai_notes_button = gr.Button("AI Notes").click(add_ai_notes) + + chunk_elements.append(gr.Column([chunk_textbox, notes_textbox, words_textbox, ai_notes_textbox, ai_notes_button])) + + notes.append(notes_textbox) + ai_notes.append(ai_notes_textbox) + + def save_all_text_action(notes=notes, ai_notes=ai_notes): + all_text = autoprocessrender_save_all_text(chunks, [note.value for note in notes], [ai_note.value for ai_note in ai_notes]) + return gr.File.update(value=all_text.encode('utf-8'), filename="all_text.txt") + + save_button = gr.Button("Save All Text") + save_button.click(save_all_text_action) + + return gr.Column(chunk_elements), notes, ai_notes, save_button + + with gr.Tab("Focus based reader"): + gr.HTML("Focus in this cotext = Stare at one spot OR Track through multiple instances (different starting points)") + focusreaderinput = gr.Textbox(placeholder="Enter text here") with gr.Row(): - with gr.Column(): - gr.HTML("Subtitle and Image Display") - gr.HTML("Upload a zip file containing preprocessed subtitles and images.") - with gr.Column(): - ppssubtitleinput = gr.File(label="Upload Zip File") - ppssubtitlebtn = gr.Button() - with gr.Row(): - with gr.Column(scale=1): - ppssubtitletextout = gr.Textbox(label="Subtitle Output") - with gr.Column(scale=2): - ppssubtitleimages = gr.Gallery(label="Images")#.style(grid=[2], height="auto") - ppssubtitlebtn.click(display_subtitles_from_zip, inputs=[ppssubtitleinput], outputs=[ppssubtitletextout , ppssubtitleimages]) - with gr.Tab("New - Learning with Youtube"): - gr.HTML("TODO: 1st syllable subtitle. First Syllable of any word is all you need to listen - pair this with Youtube subtitle interface - Listening is ability to spell really fast (real time)") - gr.HTML(" -- artificialguybr's Video Translation/Transcription Space -- | ") - with gr.Group(): - gr.HTML("Custom Subtitles Ideas - Realtime Practice = Test (Pause to learn)") - YTTransciptOutDropdown = gr.Dropdown(choices=["https://www.youtube.com/watch?v=UYk43fncV68", "https://youtu.be/dxVaP0-aFIE"], value="https://www.youtube.com/watch?v=UYk43fncV68", allow_custom_value=True) - YTTransciptOutbtn = gr.Button("Transcript to text") - YTTransciptOutVid = gr.HTML('Video will load Here') - gr.Interface(fn=subtitle_generator, inputs=None, outputs=["textbox", "textbox", "textbox"], description='Modified Subtitles Test - will only work after video has been loaded') - with gr.Row(): - with gr.Column(scale=4): - with gr.Row(): - YTTransciptAnalysedOut = gr.Textbox(placeholder="Place the translated transcript here (Click on the youtube logo to open the video and copy)") - with gr.Row(): - YTTransciptOut = gr.Textbox(placeholder="Place the translated transcript here (Click on the youtube logo to open the video and copy)") - with gr.Column(scale=1): - YTTransciptTextOnlyOut = gr.Textbox(placeholder="Place the translated transcript here (Click on the youtube logo to open the video and copy)") - YTTransciptOutbtn.click(fn=YTTransciptAnalysisandLoad, inputs=YTTransciptOutDropdown, outputs=[YTTransciptOutVid, YTTransciptOut, YTTransciptAnalysedOut, YTTransciptTextOnlyOut]) - with gr.Tab("Old - Visual - Multiline Custom Video Subtitles"): - gr.HTML("------------------------ INCOMPLETE (Somewhere around the SRT merging and merging process) -------------------------------------") - gr.HTML("LingQ Companion Idea - i.e. Full Translation Read along, and eventually Videoplayer watch along like RAMUS whisper space

Extra functions needed - Persitent Sentence translation, UNWFWO, POS tagging and Word Count per user of words in their account. Macaronic Text is also another way to practice only the important information") - gr.HTML("""

For Transcripts to any video on youtube use the link below ⬇️

https://huggingface.co/spaces/RASMUS/Whisper-youtube-crosslingual-subtitles | https://huggingface.co/spaces/vumichien/whisper-speaker-diarization""") - #gr.HTML("

If Space not loaded its because of offline devopment errors please message for edit


") - with gr.Tab("Merged Subtitles (Incomplete)"): - gr.HTML(""" Core Idea = Ability to follow one video from start to finish is more important than number of words (except for verbs)
- Step 1 - Get foreign transcript - WHISPER (Need to download video though - booo) / Youtube / Youtube transcript api / SRT websites
- Step 2 - Get Translation of foreign transcript
- Step 3 - Word for Word Translation Creation in both Directions (Paste Google Translation here)
- """) - gr.Interface(fn=split_srt_file, inputs=["text", SRTLangOptions] , outputs=["text", "file", "text", "text"], description="SRT Contents to W4W Split SRT for Google Translate") - gr.Interface(fn=chunk_srt_text, inputs=['text', Translationchuncksize], outputs=['dataframe','text'], description='Assitant for google translate character limit - aka where to expect cuts in the text') - gr.HTML("Step 4 - Pronounciation (Roman) to Subtitle Format --> GTranslate returns unformatted string") - gr.Interface(fn=splittext, inputs="text", outputs="text", description="Text for w4w creation in G Translate") - gr.HTML("Step 5 - Merge into one file") - with gr.Row(): - RomanFile = gr.File(label="Paste Roman") - W4WFile = gr.File(label="Paste Word 4 Word") - FullMeanFile = gr.File(label="Paste Full Meaning") - MacaronicFile = gr.File(label="Paste Macaronic Text") - SentGramFormula = gr.File(label="Paste Sentence Grammar Formula Text") - with gr.Row(): - MergeButton = gr.Button('Merge the seperate files into one interpolated file (Line by line merge)', ) - with gr.Row(): - MergeOutput = gr.TextArea(label="Output") - MergeButton.click(merge_lines, inputs=[RomanFile, W4WFile, FullMeanFile, MacaronicFile], outputs=[MergeOutput], ) + focusreaderinputbtnclear = gr.Button("Clear Output") + focusreaderinputbtn = gr.Button("Load single focus Text") + focusreaderinputbtn2 = gr.Button("Load multiple focus Text") + focusreaderoutput1 = gr.HTML("") + focusreaderoutput2 = gr.HTML("") + focusreaderoutput3 = gr.HTML("") + focusreaderoutput4 = gr.HTML("") + focusreaderinputbtnclear.click(fn=clearfocusreadertext , outputs=[focusreaderoutput1, focusreaderoutput2, focusreaderoutput3, focusreaderoutput4]) + focusreaderinputbtn.click(fn=singlefocusreadertext , inputs=[focusreaderinput], outputs=[focusreaderoutput1, focusreaderoutput2, focusreaderoutput3, focusreaderoutput4]) + focusreaderinputbtn2.click(fn=multifocusreadertext , inputs=[focusreaderinput], outputs=[focusreaderoutput1, focusreaderoutput2, focusreaderoutput3, focusreaderoutput4]) + + with gr.Tab("Parts Of Speech based Reader"): + gr.HTML(" Vague Words = generalisation format = reasoning pattern? Someone went somewhere then did something in multiple domains? ") + with gr.Tab("Partial Foreign Translate"): + gr.HTML("Types of verbs and their purpose") + gr.HTML("Closed class words provide some reasoning logic") + gr.Interface(fn=partial_NWOtranslate_closed_class_words, inputs=["text", "checkbox"], outputs=["text"], description="partial translation test (german) for reading assist") + with gr.Tab("Beginner - Vague Language and Guessing POS"): with gr.Row(): - gr.Text("Make sure there are 4 spaces after the last subtitle block (Otherwise its skipped)") - CleanedMergeButton = gr.Button('Create a Usable file for SRT') + gr.HTML("Some Vague Words - Quantifiers, Pronouns, etc.

Very, Many, Few, Lots,
Lets add 40 words to this list

Find Replace all nouns with something/someone or and for verbs figure out how to generalise them") + gr.HTML("Parts of speech recognition = comprehension
Three word sentences will give a easier guessing chance") + gr.HTML('') + with gr.Tab("Thinking Practice (POS)"): + gr.HTML("Ability to Part of Speech tag is end goal (SOV, SVO, VSO) as that is where guessing the meaning starts") + gr.HTML("By removing all nouns and verbs you get a format to practice thinking about your words to use to make sentences which make sense within constraints") + gr.HTML(" -- SQL Dataset - A list of simple questions -- |") + gr.Textbox(label='Use this text to hold translations of the SQL rows in the above linked dataset (A kind of What I say vs what I want)') + with gr.Tab("Custom Formated HTML Output"): + with gr.Tab("UNWFWO - Stateful Reading - Progress Tracking"): + gr.HTML("The problem is to learn you need to repeat things you know that you didnt know this morning - Repititionis only half of solution
You need to read new stuff while revising the stuff you didnt know that you just learned aka the things you write as notes
Blended Images can help") + gr.Interface(fn=UnknownTrackTexttoApp, inputs="text", outputs=["file", "html", "code"], description="HTML mini App - UNNWFWO (English grammar only for now)(To track verbs you dont know for listening practice). Use the text from here to create lists you use for the TTS section") + gr.HTML("The sentences used as notes repitition interface then can count as recently known sentences that you can ignore in favour of the sentences you didnt interact with") + gr.Label("Some Tests - click to hide - unknown word only list") + gr.HTML("------------INCOMPLETE (javascript doesnt and unhide proprely)------------------------") + gr.Interface(fn=hidingbuttontesttranslate, inputs="text", outputs=["code", "html"]) + gr.HTML("On the Acronyms you need to underline the verbs") + gr.HTML("Aim for 1000 reps per item in your mind - the end goal for full sentences is to identify the SOV equivalent ASAP") + with gr.Tab("Image based reading"): + gr.Interface(fn=imagebasedreading, inputs=["text"], outputs=["file", "html", "text"], title="Placeholder for every newline") + with gr.Tab("Reading Assitant + Unknown Tracker"): + gr.HTML("Some Tools -- Microsoft Immersive Reader (Comprehension) -- | LingQ - (Word Familiarity based) | -- Infranodus - Word Level Knowledge graphs -- ") + gr.Interface(create_acronym_map, inputs='text', outputs=['text', 'text'], description="Acronym Map Generator (per line) - Index and Memorisation Practice Tool") + gr.HTML("Repitition of things you know is a waste of time when theres stuff you dont know

In Language the first goal is bigger vocab --> Knowledge equivalent = question answer pairs but to get to those you need related information pairs

Vocab = Glossary + all non text wall(lists, diagrams, etc.)

") + gr.Textbox("Placeholder for a function that creates a set list and can takes a list for known words and auto find replaces the stuff you know out of the content") + gr.HTML("Place holder for a translate to english interface so that highlighting can still work as only english supported for now - -- Google Translate -- ") + gr.Label("Unique word ID") + gr.Interface(fn=unique_word_count, inputs="text", outputs="text", description="Wordcounter") + gr.HTML("Use the below interface to fill in the space in this format and then use the chat iframe at the top to ask llm to analyse this:

Consider how the following sentence meaning will change if the each if the selected word is replaced with one hypernym at a time:
Sentence:
Hypernyms: ") + gr.Interface(fn=SepHypandSynExpansion, inputs="text", outputs=["text", "text"], description="Word suggestions - Analyse the unique words in infranodus") + gr.Interface(fn=WikiSearch, inputs="text", outputs="text", description="One word at a time Unique word suggestions (wiki articles)") + with gr.Tab("Automating related information linking"): + gr.HTML("Questions - Taking and suggesting questions to ask = new education --> Esp. Infranodus type outer discourse identification as question generation") + gr.HTML("The point of reading is to refine future actions especially problem solving --> Creating problem scenarios = thinking ahead of time = One form of effective reading") + with gr.Tab("Notetaking ideas"): + with gr.Tab("Advanced - Making Questions = Reading"): + gr.HTML("Some Example Prompts (Even Mistral 7b is good at this)

Please make a comprehension test for the following:
Please make 10 questions baseed on this text:
") with gr.Row(): - CleanedMergeOutput = gr.TextArea(label="Output") - CleanedMergeButton.click(fn=SRTLineSort, inputs=[MergeOutput], outputs=[CleanedMergeOutput]) - with gr.Tab("Split video to segments"): - gr.HTML("How to make screenshot in vlc - https://www.vlchelp.com/automated-screenshots-interval/
") - gr.Interface(VideotoSegment, inputs=[spvvideo_file_input, spvsubtitle_file_input], outputs=spvdownload_output) - gr.TextArea("Placeholder for ffmpeg command generator and ffmpeg-python code to split video") - gr.Text("Text to Closed Class + Adjectives + Punctuation or Noun Verb + Punctuation ") - with gr.Tab("Audio - Only English thoughts as practice"): - gr.HTML("For Audio Most productive is real time recall of native (where your full reasoning ability will always be)

Find Replace new lines of the foreign text with full stops or | to get per word translation") - gr.Interface(fn=TTSforListeningPractice, inputs=["text", TTSLangOptions2], outputs="audio", description="Paste only english words in foreign order and then keep removing the words from this to practice as effectively") - with gr.Tab("Speed through Imagery"): - gr.HTML(" -- Lingua Link (Simple GPT for assistinng image creation) --
Use with placeholder generator tab below
Best for this is 2 nouns as one phrase i.e. nouns as adjectives and then you can a verb (1000 of those will take you far)") - with gr.Accordion("More Details - conversation example", open=False): - gr.Gallery(show_label=True, value=["adult-child-seong-in-namseong-DALL·E 2024-01-17.png", "adult child seong-in namseong DALL·E 2024-01-17 00.33.56.png", "adult (ɔpanyin) child (mmɔfra) DALL·E 2024-01-17 01.08.59.png", "adult (ɔpanyin) child (mmɔfra) DALL·E 2024-01-17 00.59.41.png"], label="Lingua Link Output - Mixed Spelling through Images") - gr.HTML("""

Adult Child is Seong-in Namseong

-

How do we visualize this in one image?

-

GPT's Concept

-

To visualize "adult child" translated to "seong-in namseong" in Korean, we can create an image that creatively incorporates elements representing both an adult and a child. Here's a concept:

- -

This image will represent the concept of an "adult child" or "seong-in namseong" by juxtaposing the characteristics of both stages of life.

-

User's Inquiry

-

Thats but where are the near spelled words?

-

GPT's Revised Concept

-

To incorporate words that are spelled similarly to "seong-in namseong," I will first find words in English that are close in spelling to the Korean phrase. Here are three words that somewhat resemble "seong-in namseong" in spelling:

-
    -
  1. Singing - Resembles 'seong-in' in the sound and somewhat in spelling.
  2. -
  3. Seasoning - Shares some similarity in spelling and phonetics with 'seong-in namseong'.
  4. -
  5. Song - Similar to 'seong' in 'seong-in'.
  6. -
-

Now, let's integrate these words into the image concept:

- -

This revised concept includes elements related to the words "singing," "seasoning," and "song," which are visually connected to the original phrase "seong-in namseong."

- """) - gr.Interface(fn=lingualinkassist, inputs=["text","text"], outputs="text", description="Lingua Link Prompt Assistance (Simple Prompts)") - with gr.Tab("Filter Text"): - gr.HTML("Categories for Image Creation
1. Extract only nouns
2. Extract Acronyms
3. Convert verbs to Careers
Dall-E 3 best for multi concept images - every thing else = one picture at a time
Ask the llm to create a prompt from the nouns extracted or to create english words ot sentences from the acronyms") - gr.Interface(fn=onlyplurals, inputs=["text"], outputs=["text"], description="Only plurals = optimal concepts to learn first as LT work = repitition") - gr.Interface(fn=create_acronym_map, inputs="textbox", outputs="textbox", description="Acronyms") - gr.Interface(fn=keep_nouns, inputs="textbox", outputs="textbox", description="Nouns only") - with gr.Tab("Placeholder Generation"): - gr.HTML("Placeholder for every image of each sentence - Good for ChatGPT + Dall-E (First 16 Characters is part of the filename if you get error)") - gr.Interface(fn=lambda sentence: ". ".join(sentence.split()), inputs=["text"], outputs=["text"], description="Use full stops before input below to make a world level version") - with gr.Row(): - with gr.Column(scale=4): - imageplaceholderinput = gr.TextArea(placeholder="Enter Text and Get a line by line (stand in for sentences for now) placeholder for image associated with the text") - with gr.Column(scale=1): - imageplaceholderdownload = gr.File() - imageplaceholderbtn = gr.Button("Create the image placeholder") - with gr.Row(): - with gr.Column(scale=3): - imageplaceholderoutput = gr.HTML("Preview will load here") - with gr.Column(scale=2): - imageplaceholdertextoutput = gr.Code("The code for the HTML created will come here") - imageplaceholderbtn.click(fn=imagebasedreading, inputs=[imageplaceholderinput], outputs=[imageplaceholderdownload, imageplaceholderoutput, imageplaceholdertextoutput]) - with gr.Tab("Word level Placeholder Generation"): - gr.HTML("Placeholder for every image of each word - Good for ChatGPT + Dall-E (First 16 Characters is part of the filename if you get error)") - with gr.Row(): - with gr.Column(scale=4): - imageplaceholderinputwordlevel = gr.TextArea(placeholder="Enter Text and Get a word by word placeholder for image associated with the text") - with gr.Column(scale=1): - imageplaceholderdownloadwordlevel = gr.File() - imageplaceholderbtnwordlevel = gr.Button("Create the image placeholder") - with gr.Row(): - with gr.Column(scale=3): - imageplaceholderoutputwordlevel = gr.HTML("Preview will load here") - with gr.Column(scale=2): - imageplaceholdertextoutputwordlevel = gr.Code("The code for the HTML created will come here") - imageplaceholderbtnwordlevel.click(fn=imagebasedreadingwordlevel, inputs=[imageplaceholderinputwordlevel], outputs=[imageplaceholderdownloadwordlevel, imageplaceholderoutputwordlevel, imageplaceholdertextoutputwordlevel]) - with gr.Tab('Picture Subtitles / Image Slide Show'): - gr.HTML("----------------------------------INCOMPLETE------------------------------------
runs into filepath error - The console error and download link in the files component in app have different paths and I dont know how to get the path in the interface") - gr.Interface(fn=speedmastery_load_images, inputs=speedmastery_load_imagesinput, outputs="gallery", description="Put the images you want to practice or work on") - gr.HTML('placeholder for button to start generator for time based image recognition i.e. Picture Subtitles') - with gr.Tab("UNWFWO - Stateful Reading - Progress Tracking"): - gr.HTML("The problem is to learn you need to repeat things you know that you didnt know this morning - Repititionis only half of solution
You need to read new stuff while revising the stuff you didnt know that you just learned aka the things you write as notes
Blended Images can help") - gr.Interface(fn=UnknownTrackTexttoApp, inputs="text", outputs=["file", "html", "code"], description="HTML mini App - UNNWFWO (English grammar only for now)(To track verbs you dont know for listening practice). Use the text from here to create lists you use for the TTS section") - gr.Interface(create_acronym_map, inputs='text', outputs=['text', 'text'], description="Acronym Map Generator (per line)") - gr.HTML("The sentences used as notes repitition interface then can count as recently known sentences that you can ignore in favour of the sentences you didnt interact with") - gr.Label("Some Tests - click to hide - unknown word only list") - gr.HTML("------------INCOMPLETE (javascript doesnt and unhide proprely)------------------------") - gr.Interface(fn=hidingbuttontesttranslate, inputs="text", outputs=["code", "html"]) - gr.HTML("On the Acronyms you need to underline the verbs") - gr.HTML("Aim for 1000 reps per item in your mind - the end goal for full sentences is to identify the SOV equivalent ASAP") - gr.Interface(fill_lines, inputs=["text", RepSched_Num_lines], outputs="text") - with gr.Tab("Kinesthetic / Mime Translation"): - gr.HTML("placeholder for prompt generator and tests for llama-cpp with slm OR even opencv + a face open pose comparison to viseme face open pose structure") - gr.HTML("Keep nouns and verbs -- turn every noun into a verb -- turn every verb into a pose") - gr.HTML("""Viseme Test with video recording screenshots judged LMM

# https://melindaozel.com/viseme-cheat-sheet/ -

# https://developer.oculus.com/documentation/unity/audio-ovrlipsync-viseme-reference/ -

# https://docs.aws.amazon.com/polly/latest/dg/viseme.html -

# https://docs.aws.amazon.com/polly/latest/dg/speechmarkexamples.html -

# https://docs.aws.amazon.com/polly/latest/dg/ref-phoneme-tables-shell.html -

# https://docs.aws.amazon.com/polly/latest/dg/ph-table-english-za.html -

# https://docs.aws.amazon.com/polly/latest/dg/ph-table-korean.html""") - #with gr.Tab("Transcribe - RASMUS Whisper"): - #gr.Interface.load("spaces/RASMUS/Whisper-youtube-crosslingual-subtitles", title="Subtitles") - with gr.Tab("Beginner - Reading Assitant + Unknown Tracker"): - gr.HTML(" -- Microsoft Immersive Reader (Comprehension) -- | LingQ - (Word Familiarity based) ") - gr.HTML("Repitition of things you know is a waste of time when theres stuff you dont know

In Language the goal is bigger vocab --> Knowledge equivalent = question answer pairs but to get to those you need related information pairs

Vocab = Glossary + all non text wall(lists, diagrams, etc.)

") - gr.Textbox("Placeholder for a function that creates a set list and can takes a list for known words and auto find replaces the stuff you know out of the content") - gr.Interface(fn=GuidedReading, inputs=["text", guidedreadingseperator], outputs="text", description="Manual POS Tag and Transliteration", examples=textspreprocess) - gr.HTML("Place holder for a translate to english interface so that highlighting can still work as only english supported for now - -- Google Translate -- ") - with gr.Tab("Unique word ID - use in Infranodus"): - with gr.Accordion(label="Infranodus", open=False): - gr.HTML(" -- Infranodus - Word Level Knowledge graphs -- |
Use the below interfaces to find the items that dont have entries --> These will represent new concepts or people which need to be understood individually to fully understand the text --> Infranodus search will help find related and unrelated investigation paths

TODO Figure Output Zoom / Image Dimensions") - gr.Image(label="Open Infranodus Screenshot") - gr.Image(label="Open Infranodus Screenshot") - gr.Interface(fn=unique_word_count, inputs="text", outputs="text", description="Wordcounter") - gr.HTML("Use the below interface to fill in the space in this format and then use the chat iframe at the top to ask llm to analyse this:

Consider how the following sentence meaning will change if the each if the selected word is replaced with one hypernym at a time:
Sentence:
Hypernyms: ") - gr.Interface(fn=SepHypandSynExpansion, inputs="text", outputs=["text", "text"], description="Word suggestions - Analyse the unique words in infranodus") - gr.Interface(fn=WikiSearch, inputs="text", outputs="text", description="One word at a time Unique word suggestions (wiki articles)") - with gr.Tab("Automating related information linking"): - gr.HTML("Questions - Taking and suggesting questions to ask = new education --> Esp. Infranodus type outer discourse identification as question generation") - gr.HTML("The point of reading is to refine future actions especially problem solving --> Creating problem scenarios = thinking ahead of time = One form of effective reading") - with gr.Tab("Beginner - Vague Language and Guessing POS"): - with gr.Row(): - gr.HTML("Some Vague Words - Quantifiers, Pronouns, etc.

Very, Many, Few, Lots,
Lets add 40 words to this list

Find Replace all nouns with something/someone or and for verbs figure out how to generalise them") - gr.HTML("Parts of speech recognition = comprehension
Three word sentences will give a easier guessing chance") - gr.HTML('') - with gr.Tab("Advanced - Making Questions = Reading"): - gr.HTML("Some Example Prompts (Even Mistral 7b is good at this)

Please make a comprehension test for the following:
Please make 10 questions baseed on this text:
") - with gr.Row(): - gr.TextArea("Paste the text to read here", interactive=True) - gr.TextArea("Make as many questions on the text as you can in native language and then translate", interactive=True) - gr.Dropdown(["Placeholder chunk 1", "Placeholder chunk 2", "Placeholder chunk 3"]) - gr.HTML("Load the current chunk here and Put a Dataframe where you have only one column for the questions") - gr.HTML(""" Some considerations for questions to make + gr.TextArea("Paste the text to read here", interactive=True) + gr.TextArea("Make as many questions on the text as you can in native language and then translate", interactive=True) + gr.Dropdown(["Placeholder chunk 1", "Placeholder chunk 2", "Placeholder chunk 3"]) + gr.HTML("Load the current chunk here and Put a Dataframe where you have only one column for the questions") + gr.HTML(""" Some considerations for questions to make Please continue this sentence Types of knowing something = verbatim recall, differences, characteristics, definition of the item, definitions of the items related

Mistral-Medium: @@ -2746,60 +2866,379 @@ Explicit Knowledge: In contrast to tacit knowledge, explicit knowledge is that w Intuitive Knowledge: This refers to understanding or believing something instinctively without the need for conscious reasoning. It's often experienced as a 'gut feeling' or an 'aha' moment that comes seemingly out of nowhere. Each type of knowing involves different cognitive processes and levels of understanding. The depth and breadth of one's knowledge often depend on the ability to combine these various types of knowing effectively. - """) - - with gr.Tab("Transition is the end goal (SOV, SVO, VSO)"): - gr.Interface(fn=FrontRevSentChunk, inputs=[ChunkModeDrop, "checkbox", "text", langdest], outputs="text", description="Chunks creator") - with gr.Row(): - with gr.Column(): + """) + with gr.Tab("Knowledge Ideas - Notetaking"): + gr.HTML("""

Good knowledge = ability to answer questions --> find Questions you cant answer and look for hidden answer within them

+

My One Word Theory = We only use more words than needed when we have to or are bored --> Headings exist because title is not sufficient, subheadings exist because headings are not sufficient, Book Text exists because subheadings are not sufficient

+

Big Picture = Expand the Heading and the subheadings and compare them to each other

+

Application of Knowledge = App Version of the text (eg. Jupyter Notebooks) is what you create and learn first

+ """) + gr.Label('Placeholder for LLM api plus the drop down function below populate text for each line into dropdowns') + gr.Interface(fn=TextCompFormat, inputs=["textarea", HTMLCompMode], outputs="text", description="Convert Text to HTML Dropdown or Links which you paste in any html file") + gr.Interface(fn=create_collapsiblebutton, inputs=["textbox", "textbox", "textarea"], outputs="textbox", description="Button and Div HTML Generator, Generate the HTML for a button and the corresponding div element.") + with gr.Tab("Repetition Injected Text"): + gr.Label("Optimal Study Reps is inbetween new information acquisition - i.e. any thing you havent read already") + gr.Interface(fn=RepititionInjectedReading, inputs=[Repsplitdropdown, "text", "text"], outputs="text") + with gr.Tab("Graph Based Reading", id="1"): + gr.Textbox('Parts of Speech based | Automating the Notetaking Tab either directly or using visual llm to use this interface efficiently') + gr.HTML("Types of comprehension agent
Speed of Comprehension = Verb comprehension
From the following please extract the verbs
now explain each in context
Next, use picture descriptions for each word in the verb list
Create combinations using the verb list
") + gr.HTML("How VERBS RELATE TO EACH OTHER --> Shared Nodes - what other verbs are connected to the noun in a INFRANODUS With POS Tag filters") + gr.HTML("Tree and Branches approach to learning = familiarity with keywords/headings/summaries before reading the whole text
Productivity/Work revolves around repitition which can be found looking for plurals and grouping terms eg. Headings and Hyper/Hyponyms Analysis") + gr.HTML("Sentence to PyDot graph") + gr.HTML("Currently a bug that locks all buttons in the space when you use this above example - Reload to fix") + with gr.Tab("Long Text Analysis"): + gr.HTML("For Long text searches are useful under time pressure and also bring all direct interactions with search terms - a word is defined by those around it") + gr.Label("Placeholder for old code for concordance and word counting in other test space") + with gr.Tab("Some Sample Texts"): + gr.HTML("One way to optimise reading is to quickly find the ideas that allow making decisions after
Hardcoded closed class translation
Ways for AI to transform the text (Groq can do all instantly at the same time) - Glossary, Questions, IPO patterns, Relative Meaning(Maslows, Products) Plural item extraction, Verbs Extraction, Documents related to the text in any related academic field.
") + gr.Interface(fn=LoadNLTKUDHRText, inputs=NLTKudhr, outputs=["text", "textarea"], description="UDHR as some test texts") + gr.Interface(fn=GuidedReading, inputs=["text", guidedreadingseperator], outputs="text", description="Manual POS Tag and Transliteration", examples=textspreprocess) + with gr.Tab("Real-Time - Vid/Aud/AR"): + gr.HTML("24/7 immersion with segmentation and realtime responses overlayed over your display - Commentary in real time. What is the relative ideas to sports commentary in work, school and life in general?
Currently Google Translate with live translation overlay | GPT4o = Customisable | -- OpenGPT4o by KingNish -- to a nllb interface ") + with gr.Accordion("Test continuous data collect", open=False): + SvelterealtimedebugSpaceLink = gr.Textbox("https://kwabshug-realtimedebugtestsveltevitestatic.static.hf.space") + SvelterealtimedebugSpacetest = gr.HTML("") + SvelterealtimedebugSpacetestbtn = gr.Button('Load Space') + SvelterealtimedebugSpacetestbtn.click(display_website, SvelterealtimedebugSpaceLink, SvelterealtimedebugSpacetest) + gr.Interface(fn=ImageTranslationTest , inputs=[VideoTestInput, VideoTestSubtitleInput], outputs="video") + gr.Interface(fn=segment_video_with_opencv, inputs=VideoSplitTestInput, outputs=SplitVideoOutput, description="Split video into even increments for better study tracking ") + with gr.Accordion("Image Annotation Ideas", open=False): + gr.HTML("""Reading - Caption images (SD/Dalle-E)
-- Unsplash - free images -- | --Huggingface CLIP-Interrogator Space-- | -- Clip interrogator 2 -- | -- Tag2Text is faster than clip -- |
-- Transform word to an image -- | -- Promptist (Microsoft) -- | -- RAM and Tag2Text -- | -- SAM with Clip -- """) + with gr.Accordion("RAM/Tag2Text Space - Create Tags here and Copy paste", open=False): + RAMSpaceLink = gr.Textbox("https://xinyu1205-recognize-anything.hf.space") + RAMSpacetest = gr.HTML("") + RAMSpacetestbtn = gr.Button('Load Space') + RAMSpacetestbtn.click(display_website, RAMSpaceLink, RAMSpacetest) + with gr.Accordion("Grounded SAM Space Test", open=False): + SAMSpaceLink = gr.Textbox("https://linfanluntan-grounded-sam.hf.space") + SAMSpacetest = gr.HTML("") + SAMSpacetestbtn = gr.Button('Load Space') + SAMSpacetestbtn.click(display_website, SAMSpaceLink, SAMSpacetest) + gr.HTML("Use Shift Enter To put text on new lines if the text doesnt fit
if theres an error you have to remove the foreign letters and place roman ones") + gr.Interface(fn=add_text_to_image , inputs=["image", "text"], outputs="image", description="Create Annotated images (Can create using stable diffusion and use the prompt) - Describe from one side to the other to make guessing easy") + gr.Textbox("Placeholder - Alpha Test version = Real time Lablling of All things in view using SAM and Clip Interrogator and OpenCV on pydroid --> Adjusted Demo") + with gr.Accordion("Old ideas to understand around a buffer", open=False): + gr.HTML("Steerable Surveillance system = Assistant --- people will need to manage their own infrastructure or risk total invasion of privacy") + gr.HTML("Cheap: Raspberry Pi / Pydroid and OpenCV and Tkinter = Frontend for LMM API
Expensive - XREAL Air 2, Quest 3, Vision Pro, ") + gr.HTML("HUD Experiment (Waiting for GPT4V API) - Full context of user situation + Ability to communicate in real-time to user using images (H100+ and low enough resolution and low enough steps - it/s = fps) - just like google maps but for real life") + gr.HTML("Audio: https://github.com/OpenInterpreter/01 for commands
Some sample Open Interpreter Code - https://huggingface.co/spaces/ysharma/open-interpreter/blob/main/app.py") + gr.HTML("Nicolai Nielsen Youtube channel (Tutorial) - aruco markers = position --> Preplanned responses esp paired with openinterpreter") + gr.HTML("Image Understanding Spaces links can found at the top of this space
Video Dubbing - -- artificialguybr's video transcription space -- |") + gr.HTML("Some Prompt ideas --> Prompt: Describe the place where these descriptions may be (You job is to be speculative for brainstorming purposes): A dog and a boy, the area is texas, the weather is sunny, the date is 01 May 2021
Prompt Content Ideas Ideas Clip Interrogator + Location Data aka tags for place, location and time + general news updates on the location + overview of the items in the location
Location based advise is most important but after that is information observed by appliances in the location eg. Times Computer turned on, times geyser inspected, amount of time keys havent been touched etc.
each location will have an ai personality that will relay more information ") + with gr.Tab("Order Based Audio"): + with gr.Tab("Audio Generation"): + gr.Interface(fn=TTSforListeningPractice, inputs=["text", TTSLangOptions, "checkbox"], outputs="audio", description="gTTS - Paste chorus lyrics from below here and use TTS or make notes to save here (Or paste anything)") + gr.Label("Audio - Only English thoughts as practice") + gr.HTML("For Audio Most productive is real time recall of native (where your full reasoning ability will always be)

Find Replace new lines of the foreign text with full stops or | to get per word translation") + gr.Interface(fn=TTSforListeningPractice, inputs=["text", TTSLangOptions2], outputs="audio", description="Paste only english words in foreign order and then keep removing the words from this to practice as effectively") + with gr.Tab("Audio Format Brainstorming"): + with gr.Accordion("Explanation of below brainstorm outputs", open=False): + gr.HTML("Explanation of the outputs of the merged interface - FrontRevSentChunkbrainstormoutput, AutoSyllablePracticebrainstormoutput, RandomiseTextbyTypebrainstormoutput, create_dictionarybrainstormoutput, keep_nouns_verbsbrainstormoutput, split_verbs_nounsbrainstormoutput[0], split_verbs_nounsbrainstormoutput[1], split_verbs_nounsbrainstormoutput[2], SimultaneousSpellingPracbrainstormoutput, FirstLetterSummarybrainstormoutput, AutoChorusPerWordSchedulerbrainstormoutput") + gr.HTML("Acronym cant be read without previous attentive reading - accurate measure of known vs unknown, example LLM prompt - Please help me study by making a acronym map for the maths ontology (Ask if theres questions) --then-- Good but we need to now create a 9 Acronym based words - 1 for the headings together and then one each for the subheadings") + with gr.Tab('Acronym Map Creation Space'): + with gr.Accordion('Test with LLM'): + gr.Label('Letters are always easier to recall than whole words. GPT 4 and above best suited for this prompt but can test anywhere') + gr.HTML('Please help me study by making a acronym map for the maths ontology (Ask if theres questions)') + gr.TextArea('', label='Paste LLM response') + gr.HTML('Good but we need to now create a 9 Acronym based words - 1 for the headings together and then one each for the subheadings') + gr.TextArea('', label='Paste LLM response') + gr.HTML('If study content was a map the first letters shape of the whole text = Roads') + gr.HTML('Known = ability to match an item to a retrieval cue instantly - Retrieval cue for the whole text = Acronym Map') + gr.Interface(fn=audioformatbrainstorm, inputs=[ChunkModeDrop, "checkbox", "text", langdest, RandomiseTextType], outputs=["text", "text", "text", "text", "text", "text", "text", "text", "text", "text", "text"], description="Many random ideas to reorder text for testing / practice") + gr.Interface(fn=lambda sentence: ". ".join(sentence.split()), inputs=["text"], outputs=["text"], description="Use full stops before input below to make a world level version") + gr.Interface(fill_lines, inputs=["text", RepSched_Num_lines], outputs="text") + with gr.Accordion("Merged to one interface", open=False): + gr.Interface(fn=FrontRevSentChunk, inputs=[ChunkModeDrop, "checkbox", "text", langdest], outputs="text", description="Chunks creator") gr.Interface(fn=AutoSyllablePractice, inputs="text", outputs="text", description="One Word At A Time | Audio Spelling Practice Using vowels as the seperator") gr.Textbox("A word is a list of letter as a fact is a list of words. Both are in a specific order. What is most important is practice the order so randomiser is the tool", lines=4) gr.Interface(fn=RandomiseTextbyType, inputs=["text", RandomiseTextType], outputs="text", description="Randomise order within words, sentences, paragrahs") - with gr.Column(): - #with gr.Tab("Collocations (Markov)"): - gr.HTML("Transition is the true nature of logic i.e. like some form of non-semantic embedding that is semantic?") - gr.Interface(fn=build_model, inputs="text", outputs=["text", "text"], description="Create Collocation Dictionary --> Google Kathryn Lingel - Pyambic Pentameter Example - PyCon US for more") - gr.Interface(fn=markov_generate, inputs=["text", Markovlength], outputs="text", description="Generate Text based on the collocations in the text") - with gr.Column(): - #with gr.Tab("Spelling + Chunks"): gr.Textbox("Merged Spelling Practice Placeholder - Spell multiple words simultaneously for simultaneous access", lines=3) gr.HTML("

Spell multiple words simultaneously for simultaneous access

Spelling Simplification - Use a dual language list? | Spelling is the end goal, you already know many letter orders called words so you need leverage them to remember random sequences") gr.Interface(fn=create_dictionary, inputs="text", outputs="text", title="Sort Text by first two letters") - gr.Interface(fn=keep_nouns_verbs, inputs=["text"], outputs="text", description="Noun and Verbs only (Plus punctuation)") - with gr.Tab("Knowledge Ideas - Notetaking"): - gr.HTML("""

Good knowledge = ability to answer questions --> find Questions you cant answer and look for hidden answer within them

-

My One Word Theory = We only use more words than needed when we have to or are bored --> Headings exist because title is not sufficient, subheadings exist because headings are not sufficient, Book Text exists because subheadings are not sufficient

-

Big Picture = Expand the Heading and the subheadings and compare them to each other

-

Application of Knowledge = App Version of the text (eg. Jupyter Notebooks) is what you create and learn first

- """) - gr.Label('Placeholder for LLM api plus the drop down function below populate text for each line into dropdowns') - gr.Interface(fn=TextCompFormat, inputs=["textarea", HTMLCompMode], outputs="text", description="Convert Text to HTML Dropdown or Links which you paste in any html file") - gr.Interface(fn=create_collapsiblebutton, inputs=["textbox", "textbox", "textarea"], outputs="textbox", description="Button and Div HTML Generator, Generate the HTML for a button and the corresponding div element.") - with gr.Tab("Real-Time AI - Video/Audio/AR"): - gr.HTML("
Agents = Custom Software (Personalised UI and Mods, among other things) = Custom Environments (AR) -- Open Interpreter -- | -- Microsoft Autogen -- | -- Huggingface Assistants -- |
") - gr.HTML("Steerable Surveillance system = Assistant --- people will need to manage their own infrastructure or risk total invasion of privacy") - gr.HTML("Cheap: Raspberry Pi / Pydroid and OpenCV and Tkinter = Frontend for OpenAI / OSS vision API as ChatGPT doesnt support video / real-time screenshot yet
Expensive - XREAL Air 2, Quest 3, Vision Pro, ") - gr.HTML("HUD Experiment (Waiting for GPT4V API) - Full context of user situation + Ability to communicate in real-time to user using images (H100+ and low enough resolution and low enough steps - it/s = fps) - just like google maps but for real life") - - gr.HTML("Some sample Open Interpreter Code - https://huggingface.co/spaces/ysharma/open-interpreter/blob/main/app.py") - gr.Interface(fn=ImageTranslationTest , inputs=[VideoTestInput, VideoTestSubtitleInput], outputs="video") - with gr.Accordion("STT Spaces (sanchit-gandhi spaces have microphone input)"): - Whisperspaceoptions = gr.Dropdown(choices=["https://facebook-seamless-m4t-v2-large.hf.space", "https://hf-audio-whisper-large-v3.hf.space", "https://sanchit-gandhi-whisper-jax-diarization.hf.space", "https://sanchit-gandhi-whisper-jax.hf.space", "https://sanchit-gandhi-whisper-large-v2.hf.space", "https://facebook-seamless-m4t.hf.space"], label="existing whisper spaces") - Whisperspaceoptionsbtn = gr.Button("Load Whisper Space") - WhisperspaceoptionsOut = gr.HTML() - Whisperspaceoptionsbtn.click(fn=display_website, inputs=Whisperspaceoptions, outputs=WhisperspaceoptionsOut) - with gr.Accordion("Image as prompt Spaces"): - Imagepromptspaceoptions = gr.Dropdown(choices=["https://otter-ai-otterhd-demo.hf.space", "https://adept-fuyu-8b-demo.hf.space", "https://badayvedat-llava.hf.space", "https://xinyu1205-recognize-anything.hf.space"], label="existing Image prompt spaces") - Imagepromptspaceoptionsbtn = gr.Button("Load a Image as prompt Space") - ImagepromptspaceoptionsOut = gr.HTML() - Imagepromptspaceoptionsbtn.click(fn=display_website, inputs=Imagepromptspaceoptions, outputs=ImagepromptspaceoptionsOut) - gr.HTML("Video Dubbing - -- artificialguybr's video dubbing -- |
Real Time video dubbing will be a true gamechanger") - with gr.Accordion("Old Ideas to consider", open=False): - gr.HTML("Nicolai Nielsen Youtube channel - aruco markers = position --> can test using premade ones from an image search") - gr.Textbox("Alpha Test version = Real time Lablling of All things in view using SAM and Clip Interrogator and OpenCV on pydroid --> Adjusted Demo") - gr.HTML("Some Prompt ideas --> Prompt: Describe the place where these descriptions may be (You job is to be speculative for brainstorming purposes): A dog and a boy, the area is texas, the weather is sunny, the date is 01 May 2021
Prompt Content Ideas Ideas Clip Interrogator + Location Data aka tags for place, location and time + general news updates on the location + overview of the items in the location
Location based advise is most important but after that is information observed by appliances in the location eg. Times Computer turned on, times geyser inspected, amount of time keys havent been touched etc.
each location will have an ai personality that will relay more information ") - gr.HTML(" -- RAM and Tag2Text -- | -- SAM with Clip -- ") - with gr.Tab("Incomplete Tests and Experiments"): + gr.Interface(fn=keep_nouns_verbs, inputs=["text"], outputs="text", description="Noun and Verbs only (Plus punctuation)") + gr.HTML("Below you can create and listen to the audio") + gr.Interface(fn=SimultaneousSpellingPrac, inputs=["text"], outputs=["text"], title="Simultaneous SpellingOrder fast fast practice --> 1 letter a word = fastest read") + gr.Interface(fn=FirstLetterSummary, inputs=["text"], outputs=["text"], title="Order fast fast practice --> 1 letter a word = fastest read") + with gr.Tab("Sentence to Practice Format"): + gr.Interface(fn=split_verbs_nouns , inputs="text", outputs=["text", "text", "text"], description="Comprehension reading and Sentence Format Creator") + with gr.Tab("Song Based"): + gr.HTML("Listening - Songs - Chorus
Anticipation of the item to remember is how you learn lyrics that is why songs are easy as if you heard it 10 times already your capacity to anticipate the words is great

This is where TTS helps as you are ignoring all words except the words just before the actual
Tiny Stories dataset is like a graded reader
") + gr.HTML("

Fastest way to learn words = is to have your own sound reference --> probably why babies learn fast as they make random noise

If you know the flow of the song you can remember the spelling easier

Essentially if the sounds are repeated or long notes they are easy to remember

") + gr.Interface(fn=AutoChorusInvestigator, inputs="text", outputs="text", description="Paste Full Lyrics to try find only chorus lines") + with gr.Tab("Sentence Builder - Markov Collocation based"): + with gr.Row(): + with gr.Column(scale=1): + gr.HTML("Markov generatioon only based on words you do or dont know? - delete the keys for the direction you need after text corpus analysed") + gr.HTML("Markov generatioon only based on One Youtube videos transcripts or one artist / creative") + with gr.Column(scale=3): + gr.HTML("Transition is the true nature of logic i.e. like some form of non-semantic embedding that is semantic?") + gr.Interface(fn=build_model, inputs="text", outputs=["text", "text"], description="Create Collocation Dictionary --> Google Kathryn Lingel - Pyambic Pentameter Example - PyCon US for more") + gr.Interface(fn=markov_generate, inputs=["text", Markovlength], outputs="text", description="Generate Text based on the collocations in the text") + with gr.Tab("Sentence Builder - Preprogrammed"): + gr.HTML("Claude 3 assited ideas and code") + with gr.Tab("Diary based?"): + gr.HTML("Sentence based on the activities of the day in order?") + with gr.Tab("Basic Sentence Builder"): + with gr.Tab("SVO"): + gr.Markdown( + """ + ## Subject-Verb-Object (SVO) Order + + Some languages that follow the SVO order: + - English + - Spanish + - French + - Italian + - Chinese + """ + ) + svo_subject = gr.Dropdown(sentbuildsubjects, label="Subject") + svo_verb = gr.Dropdown(sentbuildverbs, label="Verb") + svo_object = gr.Dropdown(sentbuildobjects, label="Object") + svo_output = gr.Textbox(label="Sentence (SVO)") + svo_btn = gr.Button("Generate SVO Sentence") + svo_btn.click(build_sentence_basic, inputs=[svo_subject, svo_verb, svo_object, gr.State("SVO")], outputs=svo_output) + + with gr.Tab("SOV"): + gr.Markdown( + """ + ## Subject-Object-Verb (SOV) Order + + Some languages that follow the SOV order: + - Japanese + - Korean + - Turkish + - Hindi + - Latin + """ + ) + sov_subject = gr.Dropdown(sentbuildsubjects, label="Subject") + sov_object = gr.Dropdown(sentbuildobjects, label="Object") + sov_verb = gr.Dropdown(sentbuildverbs, label="Verb") + sov_output = gr.Textbox(label="Sentence (SOV)") + sov_btn = gr.Button("Generate SOV Sentence") + sov_btn.click(build_sentence_basic, inputs=[sov_subject, sov_verb, sov_object, gr.State("SOV")], outputs=sov_output) + + with gr.Tab("VSO"): + gr.Markdown( + """ + ## Verb-Subject-Object (VSO) Order + + Some languages that follow the VSO order: + - Arabic + - Hebrew + - Irish + - Welsh + - Samoan + """ + ) + vso_verb = gr.Dropdown(sentbuildverbs, label="Verb") + vso_subject = gr.Dropdown(sentbuildsubjects, label="Subject") + vso_object = gr.Dropdown(sentbuildobjects, label="Object") + vso_output = gr.Textbox(label="Sentence (VSO)") + vso_btn = gr.Button("Generate VSO Sentence") + vso_btn.click(build_sentence_basic, inputs=[vso_subject, vso_verb, vso_object, gr.State("VSO")], outputs=vso_output) + + with gr.Tab("Complex Sentence Builder"): + gr.Markdown( + """ + ## Complex Sentence Builder + + Create intricate sentences using various grammatical components. + """ + ) + complex_subject = gr.Dropdown(sentbuildsubjects, label="Subject") + complex_verb = gr.Dropdown(sentbuildverbs, label="Verb") + complex_object = gr.Dropdown(sentbuildobjects, label="Object") + complex_adjective = gr.Dropdown(sentbuildadjectives, label="Adjective") + complex_adverb = gr.Dropdown(sentbuildadverbs, label="Adverb") + complex_prep_phrase = gr.Dropdown(sentbuildprep_phrases, label="Prepositional Phrase") + complex_conjunction = gr.Dropdown(sentbuildconjunctions, label="Conjunction") + complex_structure = gr.Radio(sentbuildchoices, label="Structure") + complex_output = gr.Textbox(label="Complex Sentence") + complex_btn = gr.Button("Generate Complex Sentence") + complex_btn.click(build_sentence, inputs=[complex_subject, complex_verb, complex_object, complex_adjective, complex_adverb, complex_prep_phrase, complex_conjunction, complex_structure], outputs=complex_output) + + with gr.Tab("Quiz"): + # ... (Quiz tab remains the same) + gr.Markdown( + """ + ## Sentence Order Quiz + + Test your knowledge of sentence orders by identifying the correct order for each given sentence. + """ + ) + quiz_sentence = gr.Textbox(label="Sentence") + quiz_question = gr.Textbox(label="Question") + quiz_choices = gr.Radio(["SVO", "SOV", "VSO"], label="Options") + quiz_answer = gr.Textbox(label="Answer") + quiz_feedback = gr.Textbox(label="Feedback") + + quiz_button = gr.Button("Generate Quiz Question") + quiz_button.click(sentbuildgenerate_quiz_question, inputs=[], outputs=[quiz_sentence, quiz_question, quiz_choices, quiz_answer]) + + submit_button = gr.Button("Submit Answer") + submit_button.click(sentbuildcheck_answer, inputs=[quiz_choices, quiz_answer], outputs=[quiz_feedback, submit_button]) + with gr.Tab("Conlangs"): + gr.HTML("What process goes into making a language? - one place to look https://www.reddit.com/r/conlangs/") + gr.HTML("Conlang as a study method? Make a mixed language of all target languages? Something inspired by esperanto?") + with gr.Tab("Vision based"): + with gr.Tab("Youtube Subs Listening Comprehension"): + gr.HTML("State Management Solution for Word --> Find LingQ Here --> https://www.lingq.com/en/") + with gr.Tab("New - Learning with Youtube"): + gr.HTML("TODO: 1st syllable subtitle. First Syllable of any word is all you need to listen - pair this with Youtube subtitle interface - Listening is ability to spell really fast (real time)") + gr.HTML(" -- artificialguybr's Video Translation/Transcription Space -- | ") + with gr.Group(): + gr.HTML("Custom Subtitles Ideas - Realtime Practice = Test (Pause to learn)") + YTTransciptOutDropdown = gr.Dropdown(choices=["https://www.youtube.com/watch?v=l8pRSuU81PU", "https://www.youtube.com/watch?v=UYk43fncV68", "https://youtu.be/dxVaP0-aFIE"], value="https://www.youtube.com/watch?v=UYk43fncV68", allow_custom_value=True) + YTTransciptOutbtn = gr.Button("Transcript to text") + YTTransciptOutVid = gr.HTML('Video will load Here') + gr.Interface(fn=subtitle_generator, inputs=None, outputs=["textbox", "textbox", "textbox"], description='Modified Subtitles Test - will only work after video has been loaded') + with gr.Row(): + with gr.Column(scale=4): + with gr.Row(): + YTTransciptAnalysedOut = gr.Textbox(placeholder="Place the translated transcript here (Click on the youtube logo to open the video and copy)") + with gr.Row(): + YTTransciptOut = gr.Textbox(placeholder="Place the translated transcript here (Click on the youtube logo to open the video and copy)") + with gr.Column(scale=1): + YTTransciptTextOnlyOut = gr.Textbox(placeholder="Place the translated transcript here (Click on the youtube logo to open the video and copy)") + YTTransciptOutbtn.click(fn=YTTransciptAnalysisandLoad, inputs=YTTransciptOutDropdown, outputs=[YTTransciptOutVid, YTTransciptOut, YTTransciptAnalysedOut, YTTransciptTextOnlyOut]) + with gr.Tab("Old - Visual - Multiline Custom Video Subtitles"): + gr.HTML("------------------------ INCOMPLETE (Somewhere around the SRT merging and merging process) -------------------------------------") + gr.HTML("LingQ Companion Idea - i.e. Full Translation Read along, and eventually Videoplayer watch along like RAMUS whisper space

Extra functions needed - Persitent Sentence translation, UNWFWO, POS tagging and Word Count per user of words in their account. Macaronic Text is also another way to practice only the important information") + gr.HTML("""

For Transcripts to any video on youtube use the link below ⬇️

https://huggingface.co/spaces/RASMUS/Whisper-youtube-crosslingual-subtitles | https://huggingface.co/spaces/vumichien/whisper-speaker-diarization""") + #gr.HTML("

If Space not loaded its because of offline devopment errors please message for edit


") + with gr.Tab("Merged Subtitles (Incomplete)"): + gr.HTML(""" Core Idea = Ability to follow one video from start to finish is more important than number of words (except for verbs)
+ Step 1 - Get foreign transcript - WHISPER (Need to download video though - booo) / Youtube / Youtube transcript api / SRT websites
+ Step 2 - Get Translation of foreign transcript
+ Step 3 - Word for Word Translation Creation in both Directions (Paste Google Translation here)
+ """) + gr.Interface(fn=split_srt_file, inputs=["text", SRTLangOptions] , outputs=["text", "file", "text", "text"], description="SRT Contents to W4W Split SRT for Google Translate") + gr.Interface(fn=chunk_srt_text, inputs=['text', Translationchuncksize], outputs=['dataframe','text'], description='Assitant for google translate character limit - aka where to expect cuts in the text') + gr.HTML("Step 4 - Pronounciation (Roman) to Subtitle Format --> GTranslate returns unformatted string") + gr.Interface(fn=splittext, inputs="text", outputs="text", description="Text for w4w creation in G Translate") + gr.HTML("Step 5 - Merge into one file") + with gr.Row(): + RomanFile = gr.File(label="Paste Roman") + W4WFile = gr.File(label="Paste Word 4 Word") + FullMeanFile = gr.File(label="Paste Full Meaning") + MacaronicFile = gr.File(label="Paste Macaronic Text") + SentGramFormula = gr.File(label="Paste Sentence Grammar Formula Text") + with gr.Row(): + MergeButton = gr.Button('Merge the seperate files into one interpolated file (Line by line merge)', ) + with gr.Row(): + MergeOutput = gr.TextArea(label="Output") + MergeButton.click(merge_lines, inputs=[RomanFile, W4WFile, FullMeanFile, MacaronicFile], outputs=[MergeOutput], ) + with gr.Row(): + gr.Text("Make sure there are 4 spaces after the last subtitle block (Otherwise its skipped)") + CleanedMergeButton = gr.Button('Create a Usable file for SRT') + with gr.Row(): + CleanedMergeOutput = gr.TextArea(label="Output") + CleanedMergeButton.click(fn=SRTLineSort, inputs=[MergeOutput], outputs=[CleanedMergeOutput]) + with gr.Tab("Split video to segments"): + gr.HTML("How to make screenshot in vlc - https://www.vlchelp.com/automated-screenshots-interval/
") + gr.Interface(VideotoSegment, inputs=[spvvideo_file_input, spvsubtitle_file_input], outputs=spvdownload_output) + gr.TextArea("Placeholder for ffmpeg command generator and ffmpeg-python code to split video") + gr.Text("Text to Closed Class + Adjectives + Punctuation or Noun Verb + Punctuation ") + with gr.Tab("Prepocessed Subtitles Practice"): + gr.HTML("Custom SD script to create image for for each noun/ verb/ etc. - ") + with gr.Row(): + with gr.Column(): + gr.HTML("Subtitle and Image Display") + gr.HTML("Upload a zip file containing preprocessed subtitles and images.") + with gr.Column(): + ppssubtitleinput = gr.File(label="Upload Zip File") + ppssubtitlebtn = gr.Button() + with gr.Row(): + with gr.Column(scale=1): + ppssubtitletextout = gr.Textbox(label="Subtitle Output") + with gr.Column(scale=2): + ppssubtitleimages = gr.Gallery(label="Images")#.style(grid=[2], height="auto") + ppssubtitlebtn.click(display_subtitles_from_zip, inputs=[ppssubtitleinput], outputs=[ppssubtitletextout , ppssubtitleimages]) + with gr.Tab("Speed through Imagery"): + with gr.Tab("Blended Images"): + gr.HTML(" -- Lingua Link (Simple GPT for assistinng image creation) --
Use with placeholder generator tab below
Best for this is 2 nouns as one phrase i.e. nouns as adjectives and then you can a verb (1000 of those will take you far)") + gr.HTML('Memorisation by string comparison idea

Result of prompt chain starting with: Lets say I have the strings "red" and "ppalgan" how can I guess the second from the first from just spelling (eg. similar words and distance in the alphabet, ...), how can I use python to do this i.e. output of no matching letters, closest letter to r, then e, then d, a dictionary of letters that look similar eg. d and p, l and I a and d etc.') + gr.Interface(fn=letterbased_guess_word, inputs=["text", "text"], outputs="text", description="letter based guess suggestions (one word to one word is the designed use case)") + with gr.Accordion("More Details - conversation example", open=False): + gr.Gallery(show_label=True, value=["adult-child-seong-in-namseong-DALL·E 2024-01-17.png", "adult child seong-in namseong DALL·E 2024-01-17 00.33.56.png", "adult (ɔpanyin) child (mmɔfra) DALL·E 2024-01-17 01.08.59.png", "adult (ɔpanyin) child (mmɔfra) DALL·E 2024-01-17 00.59.41.png"], label="Lingua Link Output - Mixed Spelling through Images") + gr.HTML("""

Adult Child is Seong-in Namseong

+

How do we visualize this in one image?

+

GPT's Concept

+

To visualize "adult child" translated to "seong-in namseong" in Korean, we can create an image that creatively incorporates elements representing both an adult and a child. Here's a concept:

+ +

This image will represent the concept of an "adult child" or "seong-in namseong" by juxtaposing the characteristics of both stages of life.

+

User's Inquiry

+

Thats but where are the near spelled words?

+

GPT's Revised Concept

+

To incorporate words that are spelled similarly to "seong-in namseong," I will first find words in English that are close in spelling to the Korean phrase. Here are three words that somewhat resemble "seong-in namseong" in spelling:

+
    +
  1. Singing - Resembles 'seong-in' in the sound and somewhat in spelling.
  2. +
  3. Seasoning - Shares some similarity in spelling and phonetics with 'seong-in namseong'.
  4. +
  5. Song - Similar to 'seong' in 'seong-in'.
  6. +
+

Now, let's integrate these words into the image concept:

+ +

This revised concept includes elements related to the words "singing," "seasoning," and "song," which are visually connected to the original phrase "seong-in namseong."

+ """) + gr.Interface(fn=lingualinkassist, inputs=["text","text"], outputs="text", description="Lingua Link Prompt Assistance (Simple Prompts)") + with gr.Tab("Filter Text for prompt items"): + gr.HTML("Categories for Image Creation
1. Extract only nouns
2. Extract Acronyms
3. Convert verbs to Careers
Dall-E 3 best for multi concept images - every thing else = one picture at a time
Ask the llm to create a prompt from the nouns extracted or to create english words ot sentences from the acronyms") + gr.Interface(fn=onlyplurals, inputs=["text"], outputs=["text"], description="Only plurals = optimal concepts to learn first as LT work = repitition") + gr.Interface(fn=create_acronym_map, inputs="textbox", outputs="textbox", description="Acronyms") + gr.Interface(fn=keep_nouns, inputs="textbox", outputs="textbox", description="Nouns only") + with gr.Tab("Placeholder Generation"): + gr.HTML("Placeholder for every image of each sentence - Good for ChatGPT + Dall-E (First 16 Characters is part of the filename if you get error)") + with gr.Row(): + with gr.Column(scale=4): + imageplaceholderinput = gr.TextArea(placeholder="Enter Text and Get a line by line (stand in for sentences for now) placeholder for image associated with the text") + with gr.Column(scale=1): + imageplaceholderdownload = gr.File() + imageplaceholderbtn = gr.Button("Create the image placeholder") + with gr.Row(): + with gr.Column(scale=3): + imageplaceholderoutput = gr.HTML("Preview will load here") + with gr.Column(scale=2): + imageplaceholdertextoutput = gr.Code("The code for the HTML created will come here") + imageplaceholderbtn.click(fn=imagebasedreading, inputs=[imageplaceholderinput], outputs=[imageplaceholderdownload, imageplaceholderoutput, imageplaceholdertextoutput]) + gr.Label("Word level Placeholder Generation") + gr.Interface(fn=lambda sentence: ". ".join(sentence.split()), inputs=["text"], outputs=["text"], description="Use full stops before input below to make a world level version") + gr.HTML("Placeholder for every image of each word - Good for ChatGPT + Dall-E (First 16 Characters is part of the filename if you get error)") + with gr.Row(): + with gr.Column(scale=4): + imageplaceholderinputwordlevel = gr.TextArea(placeholder="Enter Text and Get a word by word placeholder for image associated with the text") + with gr.Column(scale=1): + imageplaceholderdownloadwordlevel = gr.File() + imageplaceholderbtnwordlevel = gr.Button("Create the image placeholder") + with gr.Row(): + with gr.Column(scale=3): + imageplaceholderoutputwordlevel = gr.HTML("Preview will load here") + with gr.Column(scale=2): + imageplaceholdertextoutputwordlevel = gr.Code("The code for the HTML created will come here") + imageplaceholderbtnwordlevel.click(fn=imagebasedreadingwordlevel, inputs=[imageplaceholderinputwordlevel], outputs=[imageplaceholderdownloadwordlevel, imageplaceholderoutputwordlevel, imageplaceholdertextoutputwordlevel]) + with gr.Tab("Kinesthetic / Mime Translation"): + gr.HTML("placeholder for prompt generator and tests for llama-cpp with slm OR even opencv + a face open pose comparison to viseme face open pose structure") + gr.HTML("Keep nouns and verbs -- turn every noun into a verb -- turn every verb into a pose") + gr.HTML("""Viseme Test with video recording screenshots judged LMM

# https://melindaozel.com/viseme-cheat-sheet/ +

# https://developer.oculus.com/documentation/unity/audio-ovrlipsync-viseme-reference/ +

# https://docs.aws.amazon.com/polly/latest/dg/viseme.html +

# https://docs.aws.amazon.com/polly/latest/dg/speechmarkexamples.html +

# https://docs.aws.amazon.com/polly/latest/dg/ref-phoneme-tables-shell.html +

# https://docs.aws.amazon.com/polly/latest/dg/ph-table-english-za.html +

# https://docs.aws.amazon.com/polly/latest/dg/ph-table-korean.html""") + with gr.Tab("Incomplete Old Ideas"): + gr.HTML("FINAL VERSION = Image placeholder + Merged Images + Side by Side Audio + UNWFWO Reader script + Spotify/Youtube integration in one interface
True mastery is from the relations between each item aka how every word relates to each other - Repitition in the form combinatorics - llm turns these into full sentences / ideas ") + gr.HTML("Focus = Thinking = Audio = Repitition = This space is just ideas for optimising the audio content. - Audio of side by side version -- listen till you can say the foreign before the audio plays it (Knowledge version is Glossary as vocab you must mastering before reading)") with gr.Tab("Multi Output and other ideas"): with gr.Row(): with gr.Column(): @@ -2813,16 +3252,6 @@ Each type of knowing involves different cognitive processes and levels of unders gr.Label("Inspect the Transition Tab last item in left most column - RandomiseTextbyType - Incomplete, but this plus timer will work well achieve what this space aims to achieve - LLMs would choose the next set of words based on the last batch and its knowledge of your vocab level or even your current location (using phone as sensors) and can make image/audio prompts to make more engaging") gr.Label("Placeholder for take in list and return 10 items in correct order for 20 seconds and 20 seconds to assign order to each word using numbers input - generator with blocks 20 seconds to understand what was wrong and move on") gr.Label("Placeholder for long text version as well - Order of the sentence or sentence spans (spacy) is what is what most important in long text - you cant organise you dont know") - with gr.Tab("Repetition Injected Text"): - gr.Label("Optimal Study Reps is inbetween new information acquisition - i.e. any thing you havent read already") - gr.Interface(fn=RepititionInjectedReading, inputs=[Repsplitdropdown, "text", "text"], outputs="text") - with gr.Tab("Graph Based Reading", id="1"): - gr.Textbox('Parts of Speech based | Automating the Notetaking Tab either directly or using visual llm to use this interface efficiently') - gr.HTML("Types of comprehension agent
Speed of Comprehension = Verb comprehension
From the following please extract the verbs
now explain each in context
Next, use picture descriptions for each word in the verb list
Create combinations using the verb list
") - gr.HTML("How VERBS RELATE TO EACH OTHER --> Shared Nodes - what other verbs are connected to the noun in a INFRANODUS With POS Tag filters") - gr.HTML("Tree and Branches approach to learning = familiarity with keywords/headings/summaries before reading the whole text
Productivity/Work revolves around repitition which can be found looking for plurals and grouping terms eg. Headings and Hyper/Hyponyms Analysis") - gr.HTML("Sentence to PyDot graph") - gr.HTML("Currently a bug that locks all buttons in the space when you use this above example - Reload to fix") #with gr.Tab("Gradio Client Tests"): # gr.HTML("How to return componets here in gradio (as each client interface needs different inputs) like in react") with gr.Tab("Current Ideas to edit old sections"): @@ -2841,41 +3270,10 @@ Each type of knowing involves different cognitive processes and levels of unders with gr.Tab("Simultanoues Practice Zone"): gr.Label("Audio based space where you must look at the corresponding text for the audio thats playing as simultaneous practice") gr.DataFrame(None, headers=["text", "audio"], label="Add text pairs to practice", interactive=True) - gr.HTML("Below you can create and listen to the audio") - gr.Interface(fn=SimultaneousSpellingPrac, inputs=["text"], outputs=["text"], title="Simultaneous SpellingOrder fast fast practice --> 1 letter a word = fastest read") - gr.Interface(fn=FirstLetterSummary, inputs=["text"], outputs=["text"], title="Order fast fast practice --> 1 letter a word = fastest read") - gr.Interface(fn=imagebasedreading, inputs=["text"], outputs=["file", "html", "text"], title="Placeholder for every newline") - with gr.Tab("Long Text Analysis"): - gr.HTML("For Long text searches are useful under time pressure and also bring all direct interactions with search terms - a word is defined by those around it") - gr.Label("Placeholder for old code for concordance and word counting in other test space") - with gr.Tab("Video Segmentation with OpenCV Test"): - gr.Interface(fn=segment_video_with_opencv, inputs=VideoSplitTestInput, outputs=SplitVideoOutput, description="Split video into even increments for better study tracking ") - with gr.Tab('Acronym Map Creation Space'): - gr.HTML("Acronym cant be read with previous attentive reading - accurate measure of known vs unknown") - with gr.Row(): - with gr.Accordion('Acronym Map/Skeleton Creator'): - gr.HTML("Moved to Progress for now") - with gr.Accordion('Test with LLM'): - gr.Label('Letters are always easier to recall than whole words. GPT 4 and above best suited for this prompt but can test anywhere') - gr.HTML('Please help me study by making a acronym map for the maths ontology (Ask if theres questions)') - gr.TextArea('', label='Paste LLM response') - gr.HTML('Good but we need to now create a 9 Acronym based words - 1 for the headings together and then one each for the subheadings') - gr.TextArea('', label='Paste LLM response') - with gr.Accordion(''): - gr.HTML('If study content was a map the first letters shape of the whole text = Roads') - gr.HTML('Known = ability to match an item to a retrieval cue instantly - Retrieval cue for the whole text = Acronym Map') - with gr.Tab("Thinking Practice (POS)"): - gr.HTML("By removing all nouns and verbs you get a format to practice thinking about your words to use to make sentences which make sense within constraints") - with gr.Row(): - with gr.Column(): - with gr.Tab("Sentence to Practice Format"): - gr.Interface(fn=split_verbs_nouns , inputs="text", outputs=["text", "text", "text"], description="Comprehension reading and Sentence Format Creator") - with gr.Column(): - gr.HTML(" -- SQL Dataset - A list of simple questions -- |") - gr.Textbox(label='Use this text to hold translations of the SQL rows in the above linked dataset (A kind of What I say vs what I want)') - + with gr.Tab("Gradio Client Tests and Ideas"): + gr.Interface(fn=TestGradioClientQwen270b, inputs="text", outputs="text", description="Single response test of gradio client - Qwen/Qwen2-72B-Instruct, Use for testing like using a space and duplicate for heavy testing") -lliface.queue().launch(share=True) #docker #(inbrowser="true") #colab +lliface.queue().launch() #share=True) #docker #(inbrowser="true") #colab #httpcore and googletrans seem to be the cause all my bugs ---> These are problems to watch #not using the exact package versions as your local environment will lead to problems in the future when backwards compatibility is not reintroduced