How to load a custom model downloaded from hugging face - huggingface-transformers

I am checking all the answers but most of them use Bert for everything, how can I load a custom model which is cloned from hugging face to make inferences, infereces are speech to text
I did a fine tunning on whisper with custom data, inferences works calling the hugging face cloud, but after clone the repo is not working, dont know how to load locally

Related

Aframe / Three.js Tainted canvases may not be loaded

Im building an app with Aframe that requires fetching images saved onto AWS.
I was getting consistent cors rejection, and after resolving that, my images are passing cors but SOMETIMES they are not, I then utilized asset caching to render the images and the error has changed from mentioning cors to Tainted canvases
Im thinking that cors is effected by the clients internet speed or location?
Im also using aframe react and im wondering if react-rerenders on startup are causing the issue.
Make sure to have <img crossorigin="anonymous"> set, and try without the React layer (which I don't recommend using anymore for perf and scalability reasons for VR, and seeing it mishandled most of the time).

Save and load files with three.js

Is there a way to save and load stringified objects with three.js?
I found this: https://github.com/josdirksen/learning-threejs/blob/master/chapter-08/03-load-save-json-object.html
but they use localstorage to save and load, which won't work between sessions or different computers.
Is there a way to load files just like the model is loaded? This should be like loading data files for a game.
I run the webgl client with Autodesk viewer locally with http-server.
If the Object can be written to localstorage it can just as well be exported as a file. You can send them to a server and store them there (maybe something like firebase would be useful here), or you can intiate a "download" directly from the browser. This is explained in Create a file in memory for user to download, not through server.
For loading a file, you can use the file-api, which is shown here: How to open a local disk file with Javascript?.
You just need to replace the localstorage-parts in your example accordingly.
Adding to Martin's answer, the Autodesk Viewer uses files translated and hosted by Model Derivative API. It's possible to show multiple files into the same scene. The Viewer is read-only. There is a getState and loadState functions to get the objects that represents the current zoom/explode/view information, and that can be serialized and stored somewhere.
There are some samples showing how to move a geometry on the model, for instance, move the geometry of a wall (from a building model). But that is not persistent, meaning you need to implement a JavaScript (client) + back-end infrastructure to save and restore those transformations.

How to download images for reduce network usage?

I am making android app that must show a lot of images from my REST API. I want to download images, and the next time check for images' name. If the image exists show them from the phone otherwise download from server.
Now I'm using Retrofit for my network requests and Glide for show images. But I have not good idea for solve this issue.
If needed I can change the network library or image loading library.
Thanks in advance
NOTE: This question might be too broad for the liking of S.O.
What you want to do is make what is known as a cache. The idea is that you have a unique identifier (often refered to as a key) for each object in the cache, such as an md5 sum of the image data, or original name + date of creation.
When you want to display an image, you first check if the image exists in the cache. If it exists simply return with the image from cache. if it does not exist, start the download and upon completion you insert the image into the cache.
Here is an example implementation that does what you want. I cannot vouch for it's quality because I never tried it.

Docpad design considerations

I'm coming from a php/mysql background. I'm most familiar with the Kohana PHP framework and I'm trying to learn Docpad. I have a loose understand at this point and I've built out my first website and blog. Static content makes a lot of sense to me on Docpad.
I'm working on my photography site where I want to be able to upload new images to a portfolio. The backend needs to handle an uploaded high-resolution image and create several different copies at different resolutions of the image. My biggest question is how do I keep track of the image meta data that I want to display? Do I generate a physical file for each image that has all the particulars I want to track and use those files as my searchable database, much like how blog posts are setup?
Or should I go the route of using something like MongoDB to store image data there where it can be queried and plugged into a layout?
Regarding handling POST or GET data, should I be reading up on the express.js docs? I'm not really sure where to turn for that.
Wordpress uses TimThumb to re-size it's images: How does WordPress.com resize images dynamically?
Then there is this re-sizing library for node: node package for file attachments and image resizing
If you wanted to created like 3 different image sizes and use the backbone collection in DocPad, then you'd add your different re-sized images to those three different collections/folders. For access the images you might just be able to do it via it's file name. So when you copy, re-size and rename the image, in the rename step, concat the image size at the end, like: coolPhoto-med.jpg and then you could just do hard links to get to the image like /spring-collection/med/coolPhoto-med.jpg or you could use query engine to access them.
The file model has a meta attribute: https://github.com/bevry/docpad/blob/master/src/lib/models/file.coffee#L17
I've yet to learn how to use it yet though.
I know we chatted yesterday on #docpad IRC but I just wanted to answer you here too. If you do code something that re-sizes images for DocPad, please do consider putting it up on Github to share with the community.

openreadAsync vs Bitmap for image downloading from server

I have some image urls which I want to cache locally and save so that I don't need to make a web request again and again as needed.
Now, I am confused whether there is any significant benefit of using webclient's openreadasync method over bitmap for fetching the image for first time for saving it to IsolatedStorage.
For me, I think bitmap would be a better option as I would be able to get a event for progress.
This post gives good info on various image caching options.
http://blogs.msdn.com/b/swick/archive/2011/04/07/image-tips-for-windows-phone-7.aspx
Matt mentioned the fact that default image caching only works per session. So if you are implementing your own Image caching, then you will have to implement a image downloader for which the WebClient OpenReadAsync provides a way to store file locally
If you were't considering a local cache, UriSource would have been the choice.
If you want to cache images beyond the current application instance lifetime, have a look at http://blogs.msdn.com/b/delay/archive/2010/10/04/there-s-no-substitute-for-customer-feedback-improving-windows-phone-7-application-performance-now-a-bit-easier-with-lowprofileimageloader-and-deferredloadlistbox-updates.aspx which will show a way of saving the images to IsolatedStorage and then display it from there. This means you won't have to get it over the network each time the app is run.
If you're using this for lots of images be sure to manage the images you save as well so you don't fill up the disk with lots of old images you'll never need again.

Resources