Spaces:
Sleeping
Sleeping
Commit
·
af7f4e5
1
Parent(s):
1c2fbc9
generate_textを修正、生成結果のみを返すように
Browse files
app.py
CHANGED
|
@@ -16,7 +16,8 @@ model_path = hf_hub_download(
|
|
| 16 |
llm = Llama(model_path=model_path)
|
| 17 |
|
| 18 |
def generate_text(prompt):
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
iface = gr.Interface(fn=generate_text,
|
| 22 |
inputs="text",
|
|
|
|
| 16 |
llm = Llama(model_path=model_path)
|
| 17 |
|
| 18 |
def generate_text(prompt):
|
| 19 |
+
result = llm(prompt)
|
| 20 |
+
return result['choices'][0]['text']
|
| 21 |
|
| 22 |
iface = gr.Interface(fn=generate_text,
|
| 23 |
inputs="text",
|