Spaces:
Runtime error
Runtime error
File size: 409 Bytes
4c1b6db 573d720 4c1b6db 573d720 4c1b6db 573d720 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import gradio as gr
from langchain_huggingface import HuggingFaceEndpoint
llm = HuggingFaceEndpoint(
repo_id="meta-llama/Meta-Llama-3-8B-Instruct",
task="text-generation",
max_new_tokens=100,
do_sample=False,
)
def answer(question):
out=llm.invoke(question)
return out
demo = gr.Interface(fn=answer, inputs='text',outputs='text',examples=[['What is the capital of India ?']])
demo.launch() |