Spaces:
Runtime error
Runtime error
Commit
·
161b7ff
1
Parent(s):
355811f
Testing something else with app.py
Browse files
app.py
CHANGED
@@ -29,12 +29,12 @@ pipeline = transformers.pipeline(
|
|
29 |
model=model,
|
30 |
torch_dtype=torch.float16,
|
31 |
device_map="auto",
|
32 |
-
)
|
33 |
|
34 |
|
35 |
-
|
36 |
-
return "testing
|
37 |
-
|
38 |
text,
|
39 |
do_sample=True,
|
40 |
top_k=10,
|
@@ -46,9 +46,9 @@ pipeline = transformers.pipeline(
|
|
46 |
for seq in sequences:
|
47 |
print(f"Result: {seq['generated_text']}")
|
48 |
reponse += {seq['generated_text']}
|
49 |
-
return resposnse
|
50 |
|
51 |
-
|
52 |
intf.launch()"""
|
53 |
|
54 |
# import gradio as gr
|
|
|
29 |
model=model,
|
30 |
torch_dtype=torch.float16,
|
31 |
device_map="auto",
|
32 |
+
)
|
33 |
|
34 |
|
35 |
+
def debate_response(text):
|
36 |
+
return "testing
|
37 |
+
sequences = pipeline(
|
38 |
text,
|
39 |
do_sample=True,
|
40 |
top_k=10,
|
|
|
46 |
for seq in sequences:
|
47 |
print(f"Result: {seq['generated_text']}")
|
48 |
reponse += {seq['generated_text']}
|
49 |
+
return resposnse
|
50 |
|
51 |
+
intf = gr.Interface(fn=debate_response, inputs=gr.Textbox(), outputs="text")
|
52 |
intf.launch()"""
|
53 |
|
54 |
# import gradio as gr
|