Spaces:
Sleeping
Sleeping
Update app.py
Browse files12345678910111213import gradio as grfrom huggingface_hub import InferenceClientthemes=["Pick a Genre", "thriller", "fantasy", "romance", "sci-fi", "mystery", "fiction", "Spanish"]def reaction(text, theme):modelName= 'HuggingFaceH4/zephyr-7b-beta'match theme:case "Spanish":modelName='DeepESP/gpt2-spanish'thiscontent=f'Give only one {theme} response to this statement: {text}?'messages=[{'role': 'user', 'content': thiscontent}]client=InferenceClient(model=modelName)12345678910import gradio as grfrom huggingface_hub import InferenceClientthemes=["Pick a Genre", "thriller", "fantasy", "romance", "sci-fi", "mystery", "fiction"]def reaction(text, theme):modelName= 'HuggingFaceH4/zephyr-7b-beta'thiscontent=f'Give only one {theme} response to this statement: {text}?'messages=[{'role': 'user', 'content': thiscontent}]client=InferenceClient(model=modelName)
app.py+1-4