Closed Benoit-W closed 1 year ago
Hi @Benoit-W !
Can you please post a full log?
However, transformers
itself is plain-python, but have a lot of dependencies which are not (and if we do not have on python-for-android
, we will need to create a recipe to cross-compile them)
Feel free to share the full log here, then, after the triaging, we will move the issue to the appropriate repository (or split this issue into multiple ones, each one, targeting a specific package)
Hi @misl6 !
I just have few logs from the buildozer android debug command, but no log from test on android device because i didn't achieve to connect my phone to the computer because i am using wsl. When I download the apk on my phone, there is a black screen and it fail to load. log.txt
But if you want to try the compilation by yourself, my testing code is here :
from kivy.app import App from kivy.uix.label import Label import transformers
class TransformersImport(App): def build(self): return Label(text="version : "+str(transformers.version))
TransformersImport().run()
To get a log copy the .apk to Windows and install with adb: https://github.com/Android-for-Python/Android-for-Python-Users#debugging https://github.com/Android-for-Python/Android-for-Python-Users#appendix-a--using-adb
But as misl6 points out this is not going to work unless you add the transformers dependencies to requirements https://github.com/Android-for-Python/Android-for-Python-Users#requirements-basics
and these dependencies are ported to Android if necessary https://github.com/Android-for-Python/Android-for-Python-Users#wheels
Versions
Description
I am trying to use transformers library in order to do offline ML. When i try to import transformers, i have a black screen and nothing launch. I tried to import the library and print("transformers imported") through a button function. The app is well launched, but the app crash when I push the import button which import the transformers library.
buildozer.spec
Command:
Spec file:
Logs