Spaces:
Paused
Paused
File size: 896 Bytes
6d607e0 e71614a 6d607e0 e71614a 6d607e0 e71614a 6d607e0 e71614a 6d607e0 e71614a b2dbd13 6d607e0 b2dbd13 e71614a b2dbd13 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
from transformers import pipeline
pipeline = pipeline(
"text-generation",
model="Nexusflow/NexusRaven-V2-13B",
torch_dtype="auto",
device_map="auto",
)
title="""# 🙋🏻♂️Welcome to🌟Tonic's🐦⬛NexusRaven"""
description="""this model is used to select and return function calling arguments.
"""
prompt = prompt_template.format(query="What's the weather like in Seattle right now?")
result = pipeline(prompt, max_new_tokens=2048, return_full_text=False, do_sample=False, temperature=0.001)[0]["generated_text"]
print (result)
with gr.Blocks() as app:
gr.Markdown(title)
gr.Markdown(description)
with gr.Row():
with gr.Column():
input = gr.Textbox()
with gr.Column():
output = gr.Textbox()
image_input.change(process_image, inputs=image_input, outputs=output)
if __name__ == "__main__":
app.launch() |