Debate_v2 / app.py
anirudh-sub's picture
Testing something with app.py
cf665c9
raw
history blame
512 Bytes
import gradio as gr
import transformers
from transformers import AutoTokenizer
import torch
from diffusers.utils.torch_utils import randn_tensor
model = "anirudh-sub/debate_model_v2.1"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
def debate_response(text):
return "testing"
intf = gr.Interface(fn=debate_response, inputs=gr.Textbox(), outputs="text")
intf.launch()