Coder Social home page Coder Social logo

synkathairo / flan-t5-large-gradio Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 9 KB

A gradio frontend for Google's Flan-T5 Large language model, can also be adjusted for other sizes.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
gradio gradio-interface flan-t5 huggingface huggingface-transformers

flan-t5-large-gradio's Introduction

flan-t5-large-gradio

A gradio frontend for Google's Flan-T5 Large language model, can also be adjusted for other sizes.

The gradio frontend runs in the browser, and displays a chat-like interface for interacting with the language model.

To run:

Install the dependencies: gradio, transformers, sentencepiece

Recommended to install: safetensors

Optionally also install: accelerate

Run with: python flan-t5-large-gradio.py

Optionally run with: accelerate launch flan-t5-large-gradio.py (this may or may not speed up your execution)

To use other size models

Modify lines 4-6, comment/uncomment to select a different model. Note that each model has different requirements for storage/RAM, the code as presently configured assumes sufficient RAM to load the entire model.

Additional info on loading large models is on the Hugging Face website, see also

flan-t5-large-gradio's People

Contributors

synkathairo avatar

Stargazers

 avatar

Watchers

 avatar

flan-t5-large-gradio's Issues

AttributeError: module 'jinja2' has no attribute 'contextfunction'

Hello,

I am trying to run gradio on my local machine. But the provided code did not work properly.
I tried to upgrade jinaj2 and gradio packages, even uninstalled and then reinstalled , but still i am getting attribute error:

AttributeError: module 'jinja2' has no attribute 'contextfunction'

Can you please help me?
Thanks in advance,

Ayse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.