Spaces:
Running
Running
power-greg
commited on
Commit
•
356037e
1
Parent(s):
3d5df29
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,16 @@ def lamini(input):
|
|
22 |
output_type=Response,
|
23 |
model_name="lamini/instruct-tuned-2.8b"
|
24 |
)
|
25 |
-
return result.response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
iface = gr.Interface(fn=lamini, inputs="text", outputs="text")
|
28 |
iface.launch()
|
|
|
22 |
output_type=Response,
|
23 |
model_name="lamini/instruct-tuned-2.8b"
|
24 |
)
|
25 |
+
return parse_response(result.response)
|
26 |
+
|
27 |
+
def parse_response(string):
|
28 |
+
break_point = string.find("\n\n")
|
29 |
+
|
30 |
+
if break_point >= 0:
|
31 |
+
string = string[:break_point]
|
32 |
+
|
33 |
+
return string.strip()
|
34 |
+
|
35 |
|
36 |
iface = gr.Interface(fn=lamini, inputs="text", outputs="text")
|
37 |
iface.launch()
|