bananabot commited on
Commit
e20cae0
1 Parent(s): c5c8d68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import torch
2
  import pandas as pd
3
  from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM, AutoModelForSequenceClassification, TrainingArguments
4
  import gradio as gr
 
5
  #import torch.nn.functional as F
6
 
7
  from datasets import load_dataset
@@ -24,4 +25,4 @@ print(tokenizer.decode(output[0]))
24
 
25
  generator = gr.Interface.load("models/EleutherAI/gpt-neo-125M")
26
  translator = gr.Interface.load("models/Helsinki-NLP/opus-mt-en-ml")
27
- gr.Series(generator, translator).launch() # this demo generates text, then translates it to Malayalam, and outputs the final result.
 
2
  import pandas as pd
3
  from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM, AutoModelForSequenceClassification, TrainingArguments
4
  import gradio as gr
5
+ from gradio.mix import Parallel, Series
6
  #import torch.nn.functional as F
7
 
8
  from datasets import load_dataset
 
25
 
26
  generator = gr.Interface.load("models/EleutherAI/gpt-neo-125M")
27
  translator = gr.Interface.load("models/Helsinki-NLP/opus-mt-en-ml")
28
+ gr.Series(generator, translator, inputs=gr.inputs.Textbox(lines=13, label="Input Text")).launch() # this demo generates text, then translates it to Malayalam, and outputs the final result.