1 Star 0 Fork 104

zheng19891127 / gpt4free

forked from Gitee 极速下载 / gpt4free 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
phone.md 2.40 KB
一键复制 编辑 原始数据 按行查看 历史
Heiner Lohaus 提交于 2024-02-24 02:07 . Fix some typos

Guide: Running the G4F GUI on Your Smartphone

Running Python applications on your smartphone is possible with specialized apps like Pydroid. This tutorial will walk you through the process using an Android smartphone with Pydroid. Note that the steps may vary slightly for iPhone users due to differences in app names and ownership.

On the first screenshot is Pydroid and on the second is the Web UI in a browser

  1. Install Pydroid from the Google Play Store:

  2. Install the Pydroid Repository Plugin:

    • To enhance functionality, install the Pydroid repository plugin. Find it on the Google Play Store or use this link: Pydroid Repository Plugin.
  3. Adjust App Settings:

    • In the app settings for Pydroid, disable power-saving mode and ensure that the option to pause when not in use is also disabled. This ensures uninterrupted operation of your Python scripts.
  4. Install Required Packages:

    • Open Pip within the Pydroid app and install these necessary packages:
       g4f flask pillow beautifulsoup4
  5. Create a New Python Script:

    • Within Pydroid, create a new Python script and input the following content:
      from g4f import set_cookies
      
      set_cookies(".bing.com", {
          "_U": "cookie value"
      })
      
      from g4f.gui import run_gui
      
      run_gui("0.0.0.0", 8080, debug=True)
      Replace "cookie value" with your actual cookie value from Bing if you intend to create images using Bing.
  6. Execute the Script:

    • Run the script by clicking on the play button or selecting the option to execute it.
  7. Access the GUI:

By following these steps, you can successfully run the G4F GUI on your smartphone using Pydroid, allowing you to create and interact with graphical interfaces directly from your device.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/zheng19891127/gpt4free.git
git@gitee.com:zheng19891127/gpt4free.git
zheng19891127
gpt4free
gpt4free
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891