Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,10 @@ pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_ret
|
|
59 |
|
60 |
def process_input(input_text):
|
61 |
# Tokenize and truncate input increased from 77 to 4096 as suggested.
|
62 |
-
inputs = clip_processor(text=input_text, return_tensors="pt", padding=True, truncation=True, max_length=4096)
|
|
|
|
|
|
|
63 |
return inputs
|
64 |
|
65 |
# Example usage
|
|
|
59 |
|
60 |
def process_input(input_text):
|
61 |
# Tokenize and truncate input increased from 77 to 4096 as suggested.
|
62 |
+
#inputs = clip_processor(text=input_text, return_tensors="pt", padding=True, truncation=True, max_length=4096)
|
63 |
+
#return inputs
|
64 |
+
#Change clip_processor to longformer
|
65 |
+
inputs = longformer_tokenizer(input_text, return_tensors="pt", padding=True, truncation=True, max_length=4096)
|
66 |
return inputs
|
67 |
|
68 |
# Example usage
|