Spaces:
Sleeping
Sleeping
| from transformers import pipeline | |
| import gradio as gr | |
| model = pipeline( | |
| "text-generation", | |
| model="anbu-2005/Dhenu2-In-Llama3.1-8B-Instruct" | |
| ) | |
| def predict(text): | |
| result = model(text, max_length=100) | |
| return result[0]["generated_text"] | |
| demo = gr.Interface( | |
| fn=predict, | |
| inputs="text", | |
| outputs="text" | |
| ) | |
| demo.launch() |