Spaces:
Sleeping
Sleeping
Commit
·
0a332f9
1
Parent(s):
6a691cc
Update app.py
Browse files
app.py
CHANGED
@@ -8,16 +8,15 @@ def generate_response(prompt, temperature):
|
|
8 |
output = co.generate(
|
9 |
model='9b2e329d-7542-4c44-8f8c-cac03a6c4f5a-ft',
|
10 |
prompt=prompt,
|
11 |
-
|
12 |
)
|
13 |
response = output.generations[0].text
|
14 |
return response
|
15 |
|
16 |
iface = gr.Interface(fn=generate_response,
|
17 |
-
inputs=
|
18 |
-
gr.inputs.Slider(minimum=0, maximum=1, default=0.5, label="Temperature")],
|
19 |
outputs="text",
|
20 |
title='Cohere Text Generation',
|
21 |
description='Enter your prompt to generate text')
|
22 |
|
23 |
-
iface.launch(share=True)
|
|
|
8 |
output = co.generate(
|
9 |
model='9b2e329d-7542-4c44-8f8c-cac03a6c4f5a-ft',
|
10 |
prompt=prompt,
|
11 |
+
temperature=0.8 # adjust the temperature here
|
12 |
)
|
13 |
response = output.generations[0].text
|
14 |
return response
|
15 |
|
16 |
iface = gr.Interface(fn=generate_response,
|
17 |
+
inputs="text",
|
|
|
18 |
outputs="text",
|
19 |
title='Cohere Text Generation',
|
20 |
description='Enter your prompt to generate text')
|
21 |
|
22 |
+
iface.launch(share=True)
|