Spaces:
Paused
Paused
example
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def generate(
|
|
52 |
input_ids = input_ids[-MAX_INPUT_TOKEN_LENGTH:]
|
53 |
gr.Warning("Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
|
54 |
|
55 |
-
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_special_tokens=
|
56 |
generate_kwargs = dict(
|
57 |
{"input_ids": input_ids},
|
58 |
streamer=streamer,
|
@@ -114,8 +114,8 @@ chat_interface = gr.ChatInterface(
|
|
114 |
],
|
115 |
stop_btn=None,
|
116 |
examples=[
|
117 |
-
["
|
118 |
-
["
|
119 |
["Explain the plot of Cinderella in a sentence."],
|
120 |
["How many hours does it take a man to eat a Helicopter?"],
|
121 |
["Write a 100-word article on 'Benefits of Open-Source in AI research'"],
|
|
|
52 |
input_ids = input_ids[-MAX_INPUT_TOKEN_LENGTH:]
|
53 |
gr.Warning("Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
|
54 |
|
55 |
+
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_special_tokens=False)
|
56 |
generate_kwargs = dict(
|
57 |
{"input_ids": input_ids},
|
58 |
streamer=streamer,
|
|
|
114 |
],
|
115 |
stop_btn=None,
|
116 |
examples=[
|
117 |
+
["<<<<<<<\nimport org.apache.flink.api.java.tuple.Tuple2;\n\n=======\n\nimport org.apache.commons.collections.MapUtils;\nimport org.apache.flink.api.common.functions.RuntimeContext;\n\n>>>>>>>"],
|
118 |
+
["<<<<<<<\n // Simple check for whether our target app uses Recoil\n if (window[`$recoilDebugStates`]) {\n isRecoil = true;\n }\n\n=======\n\n if (\n memoizedState &&\n (tag === 0 || tag === 1 || tag === 2 || tag === 10) &&\n isRecoil === true\n ) {\n if (memoizedState.queue) {\n // Hooks states are stored as a linked list using memoizedState.next,\n // so we must traverse through the list and get the states.\n // We then store them along with the corresponding memoizedState.queue,\n // which includes the dispatch() function we use to change their state.\n const hooksStates = traverseRecoilHooks(memoizedState);\n hooksStates.forEach((state, i) => {\n\n hooksIndex = componentActionsRecord.saveNew(\n state.state,\n state.component\n );\n componentData.hooksIndex = hooksIndex;\n if (newState && newState.hooksState) {\n newState.push(state.state);\n } else if (newState) {\n newState = [state.state];\n } else {\n newState.push(state.state);\n }\n componentFound = true;\n });\n }\n }\n\n>>>>>>>"],
|
119 |
["Explain the plot of Cinderella in a sentence."],
|
120 |
["How many hours does it take a man to eat a Helicopter?"],
|
121 |
["Write a 100-word article on 'Benefits of Open-Source in AI research'"],
|