add print debugging
Browse files- app.py +2 -1
- language.py +4 -0
app.py
CHANGED
@@ -20,7 +20,8 @@ if st.button('générer'):
|
|
20 |
|
21 |
st.write('Part 2')
|
22 |
completeResponse = englishtofrench(longText(responseBase, question))
|
23 |
-
st.write(
|
|
|
24 |
|
25 |
st.write('Part 3')
|
26 |
st.write('Next step : TTS')
|
|
|
20 |
|
21 |
st.write('Part 2')
|
22 |
completeResponse = englishtofrench(longText(responseBase, question))
|
23 |
+
st.write('en : ',longText(responseBase, question))
|
24 |
+
st.write('fr : ',completeResponse)
|
25 |
|
26 |
st.write('Part 3')
|
27 |
st.write('Next step : TTS')
|
language.py
CHANGED
@@ -5,6 +5,10 @@ def longText(answere, question):
|
|
5 |
|
6 |
input_text = "i have a question and answer.\nthe question is : {}\n the response is : {}\n with this information, can you create an answer phrase?".format(question, answere)
|
7 |
|
|
|
|
|
|
|
|
|
8 |
tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large")
|
9 |
model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large")
|
10 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
|
|
5 |
|
6 |
input_text = "i have a question and answer.\nthe question is : {}\n the response is : {}\n with this information, can you create an answer phrase?".format(question, answere)
|
7 |
|
8 |
+
print(question)
|
9 |
+
print(answere)
|
10 |
+
print(input_text)
|
11 |
+
|
12 |
tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large")
|
13 |
model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large")
|
14 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|