Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,9 +32,12 @@ def generate(text):
|
|
32 |
theResult=tokenizer.decode(outputs[0])
|
33 |
print(theResult)
|
34 |
splitOutput=theResult.splitlines()
|
|
|
35 |
for i in range(0,len(splitOutput)):
|
36 |
-
|
37 |
-
|
|
|
|
|
38 |
return tokenizer.decode(outputs[0])
|
39 |
|
40 |
gradio_app = gr.Interface(
|
|
|
32 |
theResult=tokenizer.decode(outputs[0])
|
33 |
print(theResult)
|
34 |
splitOutput=theResult.splitlines()
|
35 |
+
theReturn="";
|
36 |
for i in range(0,len(splitOutput)):
|
37 |
+
print("i={},out={}".format(i, splitOutput[i]))
|
38 |
+
if(i>0 and splitOutput[i].strip()):
|
39 |
+
theReturn+=splitOutput[i].strip()
|
40 |
+
print("result={}",theReturn)
|
41 |
return tokenizer.decode(outputs[0])
|
42 |
|
43 |
gradio_app = gr.Interface(
|