mmpretrain/projects/gradio_demo
hmtbgc c0766519b1
[Feature] Add minigpt4 gradio demo and training script. (#1758)
* Add minigpt4 gradio demo

* update minigpt4 demo

* update minigpt4 demo (inference with float16)

* update minigpt4 and some dependent files

* add minigpt4 dataset for training

* add training script for minigpt4

* restore files deleted by mistake

* fix an error

* remove useless modification

* provide command line arguments for minigpt4 gradio demo and update some comments

* update code

* Update minigpt-4 readme

---------

Co-authored-by: mzr1996 <mzr1996@163.com>
2023-10-12 10:36:17 +08:00
..
README.md [Feature] Support multiple multi-modal algorithms and inferencers. (#1561) 2023-05-19 16:50:04 +08:00
conversation.py [Feature] Add minigpt4 gradio demo and training script. (#1758) 2023-10-12 10:36:17 +08:00
launch.py [Enhance] Add GPU Acceleration Apple silicon mac (#1699) 2023-07-26 17:51:00 +08:00
minigpt4_demo.py [Feature] Add minigpt4 gradio demo and training script. (#1758) 2023-10-12 10:36:17 +08:00

README.md

MMPretrain Gradio Demo

Here is a gradio demo for MMPretrain supported inference tasks.

Currently supported tasks:

  • Image Classifiation
  • Image-To-Image Retrieval
  • Text-To-Image Retrieval (require multi-modality support)
  • Image Caption (require multi-modality support)
  • Visual Question Answering (require multi-modality support)
  • Visual Grounding (require multi-modality support)

Preview

Requirements

To run the demo, you need to install MMPretrain at first. And please install with the extra multi-modality dependencies to enable multi-modality tasks.

# At the MMPretrain root folder
pip install -e ".[multimodal]"

And then install the latest gradio package.

pip install "gradio>=3.31.0"

Start

Then, you can start the gradio server on the local machine by:

# At the project folder
python launch.py

The demo will start a local server http://127.0.0.1:7860 and you can browse it by your browser. And to share it to others, please set share=True in the demo.launch().