Update demo_03.py
Browse files- demo_03.py +10 -0
demo_03.py
CHANGED
@@ -58,3 +58,13 @@ trainer.train()
|
|
58 |
predictions = trainer.predict(small_eval_dataset)
|
59 |
print(predictions.predictions.shape,predictions.label_ids.shape)
|
60 |
print(predictions)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
predictions = trainer.predict(small_eval_dataset)
|
59 |
print(predictions.predictions.shape,predictions.label_ids.shape)
|
60 |
print(predictions)
|
61 |
+
|
62 |
+
#Gradio
|
63 |
+
import gradio as gr
|
64 |
+
|
65 |
+
def greet(name):
|
66 |
+
return "Hello " + name + "!"
|
67 |
+
|
68 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
69 |
+
|
70 |
+
demo.launch()
|