Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def http_bot_yield(prompt):
|
|
44 |
delimiter=b"\0"):
|
45 |
if chunk:
|
46 |
data = json.loads(chunk.decode("utf-8"))
|
47 |
-
output = data["text"][0].split('
|
48 |
# print("output --->", output)
|
49 |
yield output
|
50 |
|
@@ -82,26 +82,26 @@ with gr.Blocks() as demo:
|
|
82 |
submit_btn = gr.Button(value="Submit")
|
83 |
clear = gr.Button("Clear")
|
84 |
|
85 |
-
# gr.Examples(examples=[
|
86 |
-
# ["What is the result of dividing 16 by 4"],
|
87 |
-
# ['Give an example of Palindrome'],
|
88 |
-
# ['What is 2+2 ?'],
|
89 |
-
# ['What is Generative AI.'],
|
90 |
-
# ['ଓଡିଶା ବିଷୟରେ ଏକ ଓଡିଆ କବିତା ଲେଖ |'],
|
91 |
-
# # ['Why this happens and how to fix it?'],
|
92 |
-
# # ["What do you think about the person's behaviour?"],
|
93 |
-
# # ['Do you know who drew this painting?'],
|
94 |
-
# ], inputs=[msg])
|
95 |
gr.Examples(examples=[
|
96 |
-
["
|
97 |
-
['
|
98 |
-
['2+2
|
99 |
-
['
|
100 |
-
['
|
101 |
# ['Why this happens and how to fix it?'],
|
102 |
# ["What do you think about the person's behaviour?"],
|
103 |
# ['Do you know who drew this painting?'],
|
104 |
], inputs=[msg])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
def user(user_message, history):
|
107 |
# print("", history + [[user_message, None]])
|
|
|
44 |
delimiter=b"\0"):
|
45 |
if chunk:
|
46 |
data = json.loads(chunk.decode("utf-8"))
|
47 |
+
output = data["text"][0].split('[/INST] ')[-1]
|
48 |
# print("output --->", output)
|
49 |
yield output
|
50 |
|
|
|
82 |
submit_btn = gr.Button(value="Submit")
|
83 |
clear = gr.Button("Clear")
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
gr.Examples(examples=[
|
86 |
+
["What is the result of dividing 16 by 4"],
|
87 |
+
['Give an example of Palindrome'],
|
88 |
+
['What is 2+2 ?'],
|
89 |
+
['What is Generative AI.'],
|
90 |
+
['ଓଡିଶା ବିଷୟରେ ଏକ ଓଡିଆ କବିତା ଲେଖ |'],
|
91 |
# ['Why this happens and how to fix it?'],
|
92 |
# ["What do you think about the person's behaviour?"],
|
93 |
# ['Do you know who drew this painting?'],
|
94 |
], inputs=[msg])
|
95 |
+
# gr.Examples(examples=[
|
96 |
+
# ["16 को 4 से विभाजित करने पर क्या परिणाम आता है?"],
|
97 |
+
# ['पैलिंड्रोम का एक उदाहरण दीजिए'],
|
98 |
+
# ['2+2 क्या है?'],
|
99 |
+
# ['जेनरेटिव एआई क्या है?'],
|
100 |
+
# ['ओडिशा के बारे में एक कविता लिखें'],
|
101 |
+
# # ['Why this happens and how to fix it?'],
|
102 |
+
# # ["What do you think about the person's behaviour?"],
|
103 |
+
# # ['Do you know who drew this painting?'],
|
104 |
+
# ], inputs=[msg])
|
105 |
|
106 |
def user(user_message, history):
|
107 |
# print("", history + [[user_message, None]])
|