Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from transformers import pipeline | |
| generator = pipeline( | |
| "text-generation", | |
| model="BioMistral/BioMistral-7B", | |
| device_map="auto" | |
| ) | |
| def generate(prompt): | |
| result = generator( | |
| prompt, | |
| max_new_tokens=200, | |
| temperature=0.3 | |
| ) | |
| return result[0]["generated_text"] | |
| iface = gr.Interface( | |
| fn=generate, | |
| inputs="text", | |
| outputs="text", | |
| title="EBM Assistant" | |
| ) | |
| iface.launch() |