updated app
Browse files
app.py
CHANGED
|
@@ -15,7 +15,12 @@ llm = Llama(
|
|
| 15 |
)
|
| 16 |
|
| 17 |
def respond(prompt):
|
| 18 |
-
out = llm(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
return out["choices"][0]["text"]
|
| 20 |
|
| 21 |
-
gr.Interface(fn=respond, inputs="text", outputs="text").launch()
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
def respond(prompt):
|
| 18 |
+
out = llm.create_completion(
|
| 19 |
+
prompt=prompt,
|
| 20 |
+
max_tokens=256,
|
| 21 |
+
temperature=0.7,
|
| 22 |
+
top_p=0.9,
|
| 23 |
+
)
|
| 24 |
return out["choices"][0]["text"]
|
| 25 |
|
| 26 |
+
gr.Interface(fn=respond, inputs="text", outputs="text").launch()
|