User trying to import a module that's not installed. Instead of bumping him and telling her to use a different workspace on which the module *is* installed, use compute resources to try and install.. nuts.. Starting with : from transformers import TFAutoModelForSeq2SeqLM, AutoTokenizer import gradio as gr model = TFAutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-small") tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-small") def gen_text(input_string, max_length): inputs = tokenizer(input_string, return_tensors="pt") outputs = model.generate(**inputs, max_length=max_length) final_text = tokenizer.batch_decode(outputs[0], skip_special_tokens=True) return (final_text) demo = gr.Interface( fn=gen_text, ...
This is what I posted on Upwork : When I try (as in the free openCV crash course on YouTube @ 20 minutes) window1 = cv.namedWindow("w1") cv.imshow(window1, cb_img ) cv.waitKey(8000) cv.destroyWindow(window1) Jupyter hangs for about 8 seconds and then I can use it again. (There is no window opening/open. That is the problem I am trying to solve. Please don't tell me to close the window :) If I try : cv.imshow("test", cb_img ) cv.waitKey(0) cv.destroyAllWindows() It hangs forever. I am on WSL2 (Ubuntu on Windows 10 through Windows Subsystem for Linux) FYI, I WAN'T to use cv2's imshow. Please don't tell me to use pyplot's imshow. Pyplot's imshow is working perfectly. What was going on? The window was opening, but it was behind other windows. There were two windows being launched - one tiny (relatively) useless blank one with "w1" in its title that caused me to hard close it umpteen times (thereby also causing the Jupyter kernel to re...