Giter VIP home page Giter VIP logo

nlpexample's Introduction

NLP Example

The repository contains code for a PyTorch Live question answering prototype. The prototype uses the Distilbert model for the question answering task and runs on-device. It runs on Android and iOS.

NOTE: This example uses an unreleased version of PyTorch Live including an API that is currently under development and can change for the final release.

How was this project bootstrapped?

The project was bootstrapped with the following command:

npx torchlive-cli@nightly init NLPExample --template react-native-template-pytorch-live@nightly

Unused packages were removed and react-native upgraded to version 0.64.3.

Screenshots

Android iOS
Screenshot of NLPExample on Android Screenshot of NLPExample on iOS

Run project in emulator or on a device

Prerequisites

Install React Native development depencencies. Follow the instructions for Setting up the development environment as provided on the React Native website.

Install project dependencies

Run yarn install to install the project dependencies.

Start Metro server

Start the Metro server, which is needed to build the app bundle (containing the transpiled TypeScript code in the <PROJECT>/src directory).

yarn start

Android

Build the apk for Android and install and run on the emulator (or on a physical device if connected via USB).

yarn android

See instructions on the React Native website for how to build the app in release variant.

iOS

Install CocoaPod dependencies

(cd ios && pod install)

Build the prototype app for iOS and run it in the simulator.

yarn ios

or use the following command to open the Xcode workspace in Xcode to build and run it.

xed ios/NLPExample.xcworkspace

See instructions on the React Native website for how to build the app in release scheme.

nlpexample's People

Contributors

raedle avatar

Watchers

 avatar

Forkers

jonathansum

nlpexample's Issues

Bulid failed

Run yarn ios failed.
截屏2022-05-10 22 20 17
截屏2022-05-10 22 19 02

This problem exists when I try to run every PyTorch Live project on my M1 MacBook.

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.