grpathak22 commited on
Commit
ad6284c
1 Parent(s): 2aa73f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -1,22 +1,22 @@
1
  import modelrun.py
2
- from transformers import AutoTokenizer, MT5ForConditionalGeneration
3
- from transformers import T5Tokenizer
4
- import streamlit as st
5
- import pandas as pd
6
- from datasets import Dataset
7
- import torch
8
- from datasets import Dataset, DatasetDict
9
- from transformers import Trainer, TrainingArguments
10
 
11
 
12
- prompt = st.text_input("Enter your proverb: ")
13
 
14
- # Tokenize the input prompt
15
- input_ids = tokenizer.encode(prompt, return_tensors='pt')
16
 
17
- # Generate the output
18
- output_ids = model.generate(input_ids, max_length=256)
19
 
20
- # Decode the output to text
21
- output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
22
- st.write(output_text)
 
1
  import modelrun.py
2
+ # from transformers import AutoTokenizer, MT5ForConditionalGeneration
3
+ # from transformers import T5Tokenizer
4
+ # import streamlit as st
5
+ # import pandas as pd
6
+ # from datasets import Dataset
7
+ # import torch
8
+ # from datasets import Dataset, DatasetDict
9
+ # from transformers import Trainer, TrainingArguments
10
 
11
 
12
+ # prompt = st.text_input("Enter your proverb: ")
13
 
14
+ # # Tokenize the input prompt
15
+ # input_ids = tokenizer.encode(prompt, return_tensors='pt')
16
 
17
+ # # Generate the output
18
+ # output_ids = model.generate(input_ids, max_length=256)
19
 
20
+ # # Decode the output to text
21
+ # output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
22
+ # st.write(output_text)